当前位置: 首页>>代码示例>>PHP>>正文


PHP Container::__construct方法代码示例

本文整理汇总了PHP中Nette\Forms\Container::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::__construct方法的具体用法?PHP Container::__construct怎么用?PHP Container::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Nette\Forms\Container的用法示例。


在下文中一共展示了Container::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * @param SeznamCaptcha $provider
  */
 public function __construct(SeznamCaptcha $provider)
 {
     parent::__construct();
     $this->provider = $provider;
     $this->validator = new CaptchaValidator($provider);
     $this['image'] = new CaptchaImage('Captcha', $provider);
     $this['code'] = new CaptchaInput('Code');
     $this['hash'] = new CaptchaHash($provider);
 }
开发者ID:minetro,项目名称:seznamcaptcha,代码行数:12,代码来源:CaptchaContainer.php

示例2: __construct

 /**
  * Form constructor.
  * @param  string
  */
 public function __construct($name = NULL)
 {
     if ($name !== NULL) {
         $this->getElementPrototype()->id = 'frm-' . $name;
         $tracker = new Controls\HiddenField($name);
         $tracker->setOmitted();
         $this[self::TRACKER_ID] = $tracker;
     }
     parent::__construct(NULL, $name);
 }
开发者ID:Richmond77,项目名称:learning-nette,代码行数:14,代码来源:Form.php

示例3: __construct

 /**
  * @param callable $factory
  * @param int $createDefault
  * @param bool $forceDefault
  *
  * @throws \Nette\InvalidArgumentException
  */
 public function __construct($factory, $createDefault = 0, $forceDefault = FALSE)
 {
     parent::__construct();
     $this->monitor('Nette\\Application\\UI\\Presenter');
     try {
         $this->factoryCallback = Callback::closure($factory);
     } catch (Nette\InvalidArgumentException $e) {
         $type = is_object($factory) ? 'instanceof ' . get_class($factory) : gettype($factory);
         throw new Nette\InvalidArgumentException('Replicator requires callable factory, ' . $type . ' given.', 0, $e);
     }
     $this->createDefault = (int) $createDefault;
     $this->forceDefault = $forceDefault;
 }
开发者ID:JedenWeb,项目名称:Replicator,代码行数:20,代码来源:Container.php

示例4: __construct

 public function __construct(Nette\Forms\ControlGroup $group = NULL, Brabijan\SeoComponents\Router\Target $target = NULL)
 {
     parent::__construct();
     $this->target = $target;
     if ($group) {
         $this->currentGroup = $group;
     }
     $this->addText("seoTitle", "Title:");
     $this->addTextArea("seoKeywords", "Keywords:");
     $this->addTextArea("seoDescription", "Description:");
     $this->addSelect("seoRobots", "Robots:", array("index" => "index", "noindex" => "noindex"));
     $this->addSelect("sitemapChangeFreq", "Sitemap change frequency:", array("always" => "always", "hourly" => "hourly", "daily" => "daily", "weekly" => "weekly", "monthly" => "monthly", "yearly" => "yearly", "never" => "never"));
     $this->addText("sitemapPriority", "Sitemap priority:")->setType("number")->setRequired()->setAttribute("step", "0.1")->addRule(Nette\Application\UI\Form::FLOAT, "Priority must be number between 0 and 1")->addRule(Nette\Application\UI\Form::RANGE, "Priority must be number between 0 and 1", array(0, 1));
     $this->addText("route", "Route:")->setRequired()->addFilter(function ($val) {
         return ltrim($val, "/");
     });
 }
开发者ID:brabijan,项目名称:nette-seo-components,代码行数:17,代码来源:SeoContainer.php

示例5: __construct

 /**
  * Form constructor.
  * @param  string
  */
 public function __construct($name = NULL)
 {
     $this->element = Nette\Utils\Html::el('form');
     $this->element->action = '';
     // RFC 1808 -> empty uri means 'this'
     $this->element->method = self::POST;
     $this->element->id = $name === NULL ? NULL : 'frm-' . $name;
     $this->monitor(__CLASS__);
     if ($name !== NULL) {
         $tracker = new Controls\HiddenField($name);
         $tracker->unmonitor(__CLASS__);
         $this[self::TRACKER_ID] = $tracker;
     }
     parent::__construct(NULL, $name);
 }
开发者ID:vrtak-cz,项目名称:nette-doctrine-sandbox,代码行数:19,代码来源:Form.php

示例6: __construct

 public function __construct($factory)
 {
     parent::__construct();
     $this->factory = Callback::check($factory);
 }
开发者ID:kysela-petr,项目名称:generator-kysela,代码行数:5,代码来源:LazyContainer.php

示例7: __construct

 /**
  * @param callable $callable_set_container
  */
 public function __construct(callable $callable_set_container)
 {
     parent::__construct();
     $this->monitor('Nette\\Application\\UI\\Presenter');
     $this->callable_set_container = $callable_set_container;
 }
开发者ID:ublaboo,项目名称:datagrid,代码行数:9,代码来源:ItemDetailForm.php

示例8: __construct

 public function __construct($containerFactory)
 {
     parent::__construct();
     $this->containerFactory = callback($containerFactory);
     $this->collection = new ArrayCollection();
 }
开发者ID:kuba1999,项目名称:DoctrineForms,代码行数:6,代码来源:ToManyContainer.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->monitor('Nette\\Forms\\Form');
 }
开发者ID:blitzik,项目名称:vycetky-doctrine,代码行数:5,代码来源:BaseFormContainer.php


注:本文中的Nette\Forms\Container::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。