| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: pagebreak.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 6 * @license GNU/GPL, see LICENSE.php 7 * Joomla! is free software. This version may have been modified pursuant 8 * to the GNU General Public License, and as distributed it includes or 9 * is derivative of works licensed under the GNU General Public License or 10 * other free or open source software licenses. 11 * See COPYRIGHT.php for copyright notices and details. 12 */ 13 14 // no direct access 15 defined( '_JEXEC' ) or die( 'Restricted access' ); 16 17 jimport( 'joomla.plugin.plugin' ); 18 19 /** 20 * Editor Pagebreak buton 21 * 22 * @package Editors-xtd 23 * @since 1.5 24 */ 25 class plgButtonPagebreak extends JPlugin 26 { 27 /** 28 * Constructor 29 * 30 * For php4 compatability we must not use the __constructor as a constructor for plugins 31 * because func_get_args ( void ) returns a copy of all passed arguments NOT references. 32 * This causes problems with cross-referencing necessary for the observer design pattern. 33 * 34 * @param object $subject The object to observe 35 * @param array $config An array that holds the plugin configuration 36 * @since 1.5 37 */ 38 function plgButtonPagebreak(& $subject, $config) 39 { 40 parent::__construct($subject, $config); 41 } 42 43 /** 44 * Display the button 45 * 46 * @return array A two element array of ( imageName, textToInsert ) 47 */ 48 function onDisplay($name) 49 { 50 global $mainframe; 51 52 $doc = & JFactory::getDocument(); 53 $template = $mainframe->getTemplate(); 54 55 $link = 'index.php?option=com_content&task=ins_pagebreak&tmpl=component&e_name='.$name; 56 57 JHTML::_('behavior.modal'); 58 59 $button = new JObject(); 60 $button->set('modal', true); 61 $button->set('link', $link); 62 $button->set('text', JText::_('Pagebreak')); 63 $button->set('name', 'pagebreak'); 64 $button->set('options', "{handler: 'iframe', size: {x: 400, y: 85}}"); 65 66 return $button; 67 } 68 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |