本文整理汇总了PHP中Zend\View\Model\ViewModel::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ViewModel::__construct方法的具体用法?PHP ViewModel::__construct怎么用?PHP ViewModel::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\View\Model\ViewModel
的用法示例。
在下文中一共展示了ViewModel::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($params = null)
{
parent::__construct($params);
$this->setTemplate($this->_template);
$this->init();
$this->widget = $this;
}
示例2: __construct
/**
* @param array $variables
* @param array $options
* @param string $template
*/
public function __construct($variables = null, $options = null, $template = null)
{
parent::__construct($variables, $options);
// May be overloaded by inheriting class
if (empty($this->template)) {
$this->template = $template;
}
}
示例3: __construct
/**
* @param array|null $variables
* @param array|null $options
*/
public function __construct($variables = null, $options = null)
{
parent::__construct($variables, $options);
$this->setTemplate(static::DEFAULT_TEMPLATE);
if (!$this->getVariable('textDomain')) {
$this->setVariable('textDomain', 'default');
}
}
示例4: __construct
public function __construct($config, $sm, $data)
{
//Initialize the view
parent::__construct();
//Get the widget definitions
$this->_allWidgets = $config['viz']['widgets'];
$this->setServiceLocator($sm);
//Set the template
$this->setTemplate('atp-viz/widget/container.phtml');
//Set the data
foreach ($data as $name => $value) {
$this->{$name} = $value;
}
}
示例5: __construct
/**
*
* @param null|array|\Traversable $variables
* @param string $htmlTemplate
* @param string $textTemplate
*/
public function __construct($htmlTemplate = '', $textTemplate = '', $variables = array())
{
parent::__construct($variables);
$this->mb = (new Mailgun())->MessageBuilder();
if ($htmlTemplate !== '') {
$htmlViewModel = new ViewModel($variables);
$htmlViewModel->setTemplate($htmlTemplate);
$this->setHtmlViewModel($htmlViewModel);
}
if ($textTemplate !== '') {
$textViewModel = new ViewModel($variables);
$textViewModel->setTemplate($textTemplate);
$this->setTextViewModel($textViewModel);
}
$this->initFrom();
$this->initTo();
$this->initSubject();
$this->initInlineFiles();
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->setViewData();
}
示例7: __construct
public function __construct($userId)
{
parent::__construct();
$this->userId = $userId;
$this->setViewData();
}
示例8: __construct
public function __construct(\Application\Model\Calendar $calendar, $variables = null, $options = null)
{
$this->calendar = $calendar;
parent::__construct($variables, $options);
$this->setTerminal(true);
}
示例9: __construct
public function __construct($variables = null, $options = null)
{
parent::__construct($variables, $options);
}
示例10: __construct
public function __construct($variables = null, $options = null)
{
$variables['name'] = !isset($variables['name']) ? "" : $variables['name'];
$this->name = $variables['name'];
parent::__construct($variables, $options);
}
示例11: __construct
/**
* Constructor
*
* @param string $name
* @param null|array|Traversable $variables
* @param array|Traversable $options
*/
public function __construct($name, $variables = null, $options = null)
{
$this->setName($name);
parent::__construct($variables, $options);
}
示例12: __construct
/**
* Constructor
*
* @param null|array|Traversable $variables
* @param array|Traversable $options
*/
public function __construct($variables = null, $options = null)
{
$this->setTemplate('whathood/error/index.phtml');
parent::__construct($variables, $options);
}
示例13: __construct
/**
* @param null $variables
* @param null $options
*/
public function __construct($variables = null, $options = null)
{
$this->terminate = true;
parent::__construct($variables, $options);
}
示例14: __construct
/**
* @param mixed $variables
* @param string $options
*/
public function __construct($variables = null, $options = null)
{
parent::__construct($variables, $options);
$this->setTerminal(true);
}
示例15: __construct
/**
* Constructor
*
* @param string $snippetName
* @param string $snippetIdentifier
* @param null $variables
* @param null $options
*/
public function __construct($snippetName, $snippetIdentifier, $variables = null, $options = null)
{
$this->setSnippetName($snippetName);
$this->setSnippetIdentifier($snippetIdentifier);
parent::__construct($variables, $options);
}