/plugins/editors-xtd/pagebreak/pagebreak.php
PHP | 47 lines | 21 code | 8 blank | 18 comment | 0 complexity | 71d08c2ac12b4105066274df4445af82 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
- <?php
- /**
- * @version $Id$
- * @package Joomla
- * @copyright Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved.
- * @license GNU General Public License version 2 or later; see LICENSE.txt
- */
- // no direct access
- defined('_JEXEC') or die;
- jimport('joomla.plugin.plugin');
- /**
- * Editor Pagebreak buton
- *
- * @package Editors-xtd
- * @since 1.5
- */
- class plgButtonPagebreak extends JPlugin
- {
- /**
- * Display the button
- *
- * @return array A two element array of (imageName, textToInsert)
- */
- function onDisplay($name)
- {
- $app = JFactory::getApplication();
- $doc = & JFactory::getDocument();
- $template = $app->getTemplate();
- $link = 'index.php?option=com_content&task=ins_pagebreak&tmpl=component&e_name='.$name;
- JHtml::_('behavior.modal');
- $button = new JObject;
- $button->set('modal', true);
- $button->set('link', $link);
- $button->set('text', JText::_('Pagebreak'));
- $button->set('name', 'pagebreak');
- $button->set('options', "{handler: 'iframe', size: {x: 400, y: 85}}");
- return $button;
- }
- }