CoreFiles by mySites.guru
pagebreak.php52 lines, 1,231 bytes, from Joomla_3.2.2-Stable-Full_Package.zip
Raw History Compare with 3.2.1
md5
5985f6d6d27b0e8b77b5871c410db576
sha1
e415edc103e99734d2374aa4a8627f71957da209
sha256
dec13dd0b13174ac3da64f0b038a8c4e1b22fe0304a9976a607efafd3abee849
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.pagebreak
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Pagebreak buton
 *
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.pagebreak
 * @since       1.5
 */
class PlgButtonPagebreak extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return array A two element array of (imageName, textToInsert)
	 */
	public function onDisplay($name)
	{
		JHtml::_('behavior.modal');

		$link = 'index.php?option=com_content&amp;view=article&amp;layout=pagebreak&amp;tmpl=component&amp;e_name=' . $name;

		$button = new JObject;
		$button->modal = true;
		$button->class = 'btn';
		$button->link  = $link;
		$button->text  = JText::_('PLG_EDITORSXTD_PAGEBREAK_BUTTON_PAGEBREAK');
		$button->name  = 'copy';
		$button->options = "{handler: 'iframe', size: {x: 500, y: 300}}";

		return $button;
	}
}

The same content is in 13 releases, Joomla 3.2.2 to 3.3.6. See them all, or every version of this file.