當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ViewModel::__construct方法代碼示例

本文整理匯總了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;
 }
開發者ID:daemonalchemist,項目名稱:atp-core,代碼行數:7,代碼來源:Widget.php

示例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;
     }
 }
開發者ID:andrearruda,項目名稱:FormRenderer,代碼行數:13,代碼來源:Element.php

示例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');
     }
 }
開發者ID:gridguyz,項目名稱:core,代碼行數:12,代碼來源:WizardStep.php

示例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;
     }
 }
開發者ID:daemonalchemist,項目名稱:atp-viz,代碼行數:14,代碼來源:Container.php

示例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();
 }
開發者ID:ebittleman,項目名稱:mailgun-zf2,代碼行數:25,代碼來源:MessageViewModel.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setViewData();
 }
開發者ID:SeiYukinariEc,項目名稱:ProcessManagement,代碼行數:5,代碼來源:MemberViewModel.php

示例7: __construct

 public function __construct($userId)
 {
     parent::__construct();
     $this->userId = $userId;
     $this->setViewData();
 }
開發者ID:SeiYukinariEc,項目名稱:ProcessManagement,代碼行數:6,代碼來源:MemberDetailViewModel.php

示例8: __construct

 public function __construct(\Application\Model\Calendar $calendar, $variables = null, $options = null)
 {
     $this->calendar = $calendar;
     parent::__construct($variables, $options);
     $this->setTerminal(true);
 }
開發者ID:Theodia,項目名稱:theodia.org,代碼行數:6,代碼來源:CalendarModel.php

示例9: __construct

 public function __construct($variables = null, $options = null)
 {
     parent::__construct($variables, $options);
 }
開發者ID:Niloofareyjey,項目名稱:ellie-ui,代碼行數:4,代碼來源:Set.php

示例10: __construct

 public function __construct($variables = null, $options = null)
 {
     $variables['name'] = !isset($variables['name']) ? "" : $variables['name'];
     $this->name = $variables['name'];
     parent::__construct($variables, $options);
 }
開發者ID:pderakhshanfar,項目名稱:elli-ui,代碼行數:6,代碼來源:Element.php

示例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);
 }
開發者ID:gridguyz,項目名稱:core,代碼行數:12,代碼來源:MetaContent.php

示例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);
 }
開發者ID:godentarek,項目名稱:whathood,代碼行數:11,代碼來源:ErrorViewModel.php

示例13: __construct

 /**
  * @param null $variables
  * @param null $options
  */
 public function __construct($variables = null, $options = null)
 {
     $this->terminate = true;
     parent::__construct($variables, $options);
 }
開發者ID:old-town,項目名稱:workflow-designer-server,代碼行數:9,代碼來源:WorkflowDescriptorApiModel.php

示例14: __construct

 /**
  * @param mixed $variables
  * @param string $options
  */
 public function __construct($variables = null, $options = null)
 {
     parent::__construct($variables, $options);
     $this->setTerminal(true);
 }
開發者ID:zhangyuxiao,項目名稱:qoros,代碼行數:9,代碼來源:PartialViewModel.php

示例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);
 }
開發者ID:ins0,項目名稱:zf2-snippster,代碼行數:14,代碼來源:ViewSnippet.php


注:本文中的Zend\View\Model\ViewModel::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。