Source for file pagebreak.php

Documentation is available at pagebreak.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Plugin
  4.  * @subpackage  Editors-xtd.pagebreak
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. /**
  13.  * Editor Pagebreak buton
  14.  *
  15.  * @package     Joomla.Plugin
  16.  * @subpackage  Editors-xtd.pagebreak
  17.  * @since       1.5
  18.  */
  19. class PlgButtonPagebreak extends JPlugin
  20. {
  21.     /**
  22.      * Load the language file on instantiation.
  23.      *
  24.      * @var    boolean 
  25.      * @since  3.1
  26.      */
  27.     protected $autoloadLanguage = true;
  28.  
  29.     /**
  30.      * Display the button
  31.      *
  32.      * @param   string  $name  The name of the button to add
  33.      *
  34.      * @return array A two element array of (imageName, textToInsert)
  35.      */
  36.     public function onDisplay($name)
  37.     {
  38.         JHtml::_('behavior.modal');
  39.  
  40.         $link 'index.php?option=com_content&amp;view=article&amp;layout=pagebreak&amp;tmpl=component&amp;e_name=' $name;
  41.  
  42.         $button new JObject;
  43.         $button->modal true;
  44.         $button->class 'btn';
  45.         $button->link  $link;
  46.         $button->text  JText::_('PLG_EDITORSXTD_PAGEBREAK_BUTTON_PAGEBREAK');
  47.         $button->name  'copy';
  48.         $button->options "{handler: 'iframe', size: {x: 500, y: 300}}";
  49.  
  50.         return $button;
  51.     }
  52. }

Documentation generated on Tue, 19 Nov 2013 15:10:04 +0100 by phpDocumentor 1.4.3