/pdf/code/trunk/administrator/components/com_artofpdf/helpers/artofpdf.php
PHP | 62 lines | 25 code | 5 blank | 32 comment | 2 complexity | e2230dfb338426c36a96fb19d9f69208 MD5 | raw file
- <?php
- /**
- * @version $Id: artofpdf.php 320 2010-10-18 01:03:30Z eddieajau $
- * @package NewLifeInIT
- * @subpackage com_artofpdf
- * @copyright Copyright 2010 New Life in IT Pty Ltd. All rights reserved.
- * @license GNU General Public License version 2 or later.
- * @link http://www.theartofjoomla.com
- */
- // No direct access
- defined('_JEXEC') or die;
- /**
- * ArtofPdf display helper.
- *
- * @package NewLifeInIT
- * @subpackage com_artofpdf
- * @since 1.0
- */
- class ArtofPdfHelper
- {
- /**
- * Configure the Linkbar.
- *
- * @param string The name of the active view.
- *
- * @return void
- * @since 1.6
- */
- public static function addSubmenu($vName)
- {
- JSubMenuHelper::addEntry(
- JText::_('COM_ARTOFPDF_PDFS_SUBMENU'),
- 'index.php?option=com_artofpdf&view=pdfs',
- $vName == 'pdfs'
- );
- }
- /**
- * Get any pdf directives from content keywords.
- *
- * @param string $keywords The meta keywords for the content.
- *
- * @return array
- * @since 1.0.1
- */
- public function getDirectives($keywords)
- {
- $result = array();
- $words = preg_split('#\s*,\s*#', $keywords);
- foreach ($words as $word)
- {
- if (preg_match('#^pdf-(.*)#i', $word, $m)) {
- $result[] = $m[1];
- }
- }
- return $result;
- }
- }