本文整理汇总了PHP中JToolbar::loadButtonType方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolbar::loadButtonType方法的具体用法?PHP JToolbar::loadButtonType怎么用?PHP JToolbar::loadButtonType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolbar
的用法示例。
在下文中一共展示了JToolbar::loadButtonType方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @return void
*
* @since 3.1
*/
protected function setUp()
{
$this->toolbar = JToolbar::getInstance();
$this->object = $this->toolbar->loadButtonType('link');
$this->saveFactoryState();
JFactory::$application = $this->getMockApplication();
}
示例2: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @return void
*
* @since 3.0
*/
protected function setUp()
{
$this->toolbar = JToolbar::getInstance();
$this->object = $this->toolbar->loadButtonType('confirm');
$this->saveFactoryState();
JFactory::$application = $this->getMockCmsApp();
$this->backupServer = $_SERVER;
$_SERVER['HTTP_HOST'] = 'example.com';
$_SERVER['SCRIPT_NAME'] = '';
}
示例3: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
$this->toolbar = JToolbar::getInstance();
$this->object = $this->toolbar->loadButtonType('confirm');
}
示例4: die
/**
* K2import entry point for K2import Component
*
* @package K2import
* @link http://www.individual-it.net
* @license GNU/GPL
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
// Require the base controller
require_once JPATH_COMPONENT . DS . 'controller.php';
require_once JPATH_COMPONENT . DS . 'helper.php';
//Create a new toolbar:
jimport('joomla.html.toolbar');
$toolbar = new JToolbar('toolbar');
//Add the Jix button path & load the upload button type:
$toolbar->addButtonPath(JPATH_COMPONENT . DS . 'button');
$button =& $toolbar->loadButtonType('Upload', true);
$button =& $toolbar->loadButtonType('Export', true);
$button =& $toolbar->loadButtonType('Instructions', true);
// Require specific controller if requested
if ($controller = JRequest::getVar('controller')) {
require_once JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php';
}
// Create the controller
$classname = 'K2importController' . $controller;
$controller = new $classname();
// Perform the Request task
$controller->execute(JRequest::getVar('task'));
// Redirect if set by the controller
$controller->redirect();
示例5: testLoadButtonType
/**
* @todo Implement testLoadButtonType().
*/
public function testLoadButtonType()
{
$this->assertThat($this->object->loadButtonType('Separator'), $this->isInstanceOf('JToolbarButtonSeparator'));
}
示例6: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @return void
*
* @since 3.0
*/
protected function setUp()
{
parent::setUp();
$this->toolbar = JToolbar::getInstance();
$this->object = $this->toolbar->loadButtonType('custom');
}