本文整理汇总了PHP中JModelAdmin::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP JModelAdmin::__construct方法的具体用法?PHP JModelAdmin::__construct怎么用?PHP JModelAdmin::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JModelAdmin
的用法示例。
在下文中一共展示了JModelAdmin::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testConstructorAppliesConfiguration
/**
* Test JModelAdmin::__construct
*
* @since 3.4
*
* @return void
*
* @testdox Constructor applies configuration
*/
public function testConstructorAppliesConfiguration()
{
$config = array('event_after_delete' => 'event_after_delete', 'event_after_save' => 'event_after_save', 'event_before_delete' => 'event_before_delete', 'event_before_save' => 'event_before_save', 'event_change_state' => 'event_change_state', 'text_prefix' => 'text_prefix');
$this->object->__construct($config);
// Check if config was applied correctly
foreach ($config as $key => $value) {
if ($key == "text_prefix") {
$this->assertEquals(strtoupper($value), TestReflection::getValue($this->object, $key));
} else {
$this->assertEquals($value, TestReflection::getValue($this->object, $key));
}
}
}
示例2: array
/**
* Constructor
*
* @since 0.9
*/
function __construct()
{
parent::__construct();
$cid = JRequest::getVar('cid', array(0), '', 'array');
JArrayHelper::toInteger($cid, array(0));
$this->setId($cid[0]);
}
示例3: __construct
/**
* @param array $config
*/
public function __construct($config = array())
{
parent::__construct($config);
$container = RokCommon_Service::getContainer();
/** @var $dispatcher RokCommon_Dispatcher */
$this->dispatcher = $container->roksprocket_dispatcher;
}
示例4: __construct
/**
* Constructor
* Determines the template ID
*
*
* @since 1.1.0
*/
public function __construct()
{
parent::__construct();
$jinput = JFactory::getApplication()->input;
$array = $jinput->get('cid', 0, '', 'array');
$this->setId((int) $array[0]);
}
示例5:
function __construct()
{
$app = JFactory::getApplication();
$this->contentid = JRequest::getCmd('id');
$this->input = $app->input;
parent::__construct();
}
示例6:
/**
* Constructor that retrieves the ID from the request
*
* @access public
* @return void
*/
function __construct()
{
parent::__construct();
//$array = JRequest::getVar('cid', 0, '', 'array');
$array = JFactory::getApplication()->input->server->get('cid', 0, 'INT');
$this->setId((int) $array[0]);
}
示例7: __construct
public function __construct($config = array())
{
parent::__construct($config);
$this->app = JFactory::getApplication();
$this->me = KunenaUserHelper::getMyself();
$this->config = KunenaFactory::getConfig();
}
示例8:
function __construct()
{
$this->imageCount = 0;
$this->categoryCount = 0;
$this->firstImageFolder = '';
parent::__construct();
}
示例9: __construct
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
*
* @see JController
* @since 1.0.0
*/
public function __construct($config = array())
{
parent::__construct($config);
if (isset($config['item_states'])) {
$this->_item_states = $config['item_states'];
}
}
示例10:
/**
* Constructor
*
* @since 0.9
*/
function __construct()
{
parent::__construct();
$group_id = JRequest::getVar('group_id', 0, '', 'int');
$this->set('group_id', $group_id);
$array = JRequest::getVar('cid', 0, '', 'array');
$this->setId((int) $array[0]);
}
示例11: array
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @return JControllerForm
* @since 1.6
*/
function __construct($config = array())
{
parent::__construct($config);
$params = JComponentHelper::getParams($this->option);
$images_path = JPATH_SITE . '/' . $params->get('images_path', 'images/bt_portfolio') . '/';
self::createFolder($images_path);
self::createFolder($images_path . 'categories/');
}
示例12: __construct
/**
* Constructor.
*
* @param array An optional associative array of configuration settings.
*
* @see JController
*/
public function __construct()
{
// Load plugin parameters
require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
$this->parameters = nnParameters::getInstance();
$this->_config = $this->parameters->getComponentParams('snippets');
parent::__construct();
}
示例13: __construct
/**
* Constructor
*
* @access public
* @param array $config An optional associative array of configuration settings.
* @return void
*/
public function __construct($config = array())
{
parent::__construct($config);
$layout = $this->getLayout();
$jinput = JFactory::getApplication()->input;
$render = $jinput->get('render', null, 'CMD');
$this->context = strtolower($this->option . '.' . $this->getName() . ($layout ? '.' . $layout : '') . ($render ? '.' . $render : ''));
}
示例14:
function __construct()
{
parent::__construct();
if (!class_exists('TableTour')) {
AImporter::table('tour');
}
$this->_table = $this->getTable('tour');
}
示例15:
function __construct($config)
{
parent::__construct();
$this->option = JOOMDOC_OPTION;
$this->name = $this->getName();
$this->setState($this->getName() . '.id', JRequest::getInt('id'));
$this->checkin();
}