[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Site 5 * @subpackage mod_syndicate 6 * 7 * @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 namespace Joomla\Module\Syndicate\Site\Helper; 12 13 use Joomla\CMS\Document\HtmlDocument; 14 use Joomla\Registry\Registry; 15 use Joomla\Utilities\ArrayHelper; 16 17 // phpcs:disable PSR1.Files.SideEffects 18 \defined('_JEXEC') or die; 19 // phpcs:enable PSR1.Files.SideEffects 20 21 /** 22 * Helper for mod_syndicate 23 * 24 * @since 1.5 25 */ 26 class SyndicateHelper 27 { 28 /** 29 * Gets the link 30 * 31 * @param Registry $params The module parameters 32 * @param HtmlDocument $document The document 33 * 34 * @return string|null The link as a string, if found 35 * 36 * @since 1.5 37 */ 38 public static function getLink(Registry $params, HtmlDocument $document) 39 { 40 foreach ($document->_links as $link => $value) { 41 $value = ArrayHelper::toString($value); 42 43 if (strpos($value, 'application/' . $params->get('format') . '+xml')) { 44 return $link; 45 } 46 } 47 48 return null; 49 } 50 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |