本文整理匯總了PHP中Nette\Forms\Container::attached方法的典型用法代碼示例。如果您正苦於以下問題:PHP Container::attached方法的具體用法?PHP Container::attached怎麽用?PHP Container::attached使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Nette\Forms\Container
的用法示例。
在下文中一共展示了Container::attached方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: attached
protected function attached($obj)
{
parent::attached($obj);
if ($obj instanceof IPresenter) {
$this->whenAttached();
}
}
示例2: attached
protected function attached($obj)
{
parent::attached($obj);
if ($obj instanceof Form) {
$this->configure();
}
}
示例3: attached
/**
* @param \Nette\ComponentModel\IContainer
*/
protected function attached($presenter)
{
parent::attached($presenter);
if (!$presenter instanceof Nette\Application\UI\Presenter) {
return;
}
$this->loadHttpData();
}
示例4: attached
/**
* Magical component factory
*
* @param \Nette\ComponentModel\IContainer
*/
protected function attached($obj)
{
parent::attached($obj);
if (!$obj instanceof Nette\Application\UI\Presenter) {
return;
}
$this->loadHttpData();
$this->createDefault();
}
示例5: attached
/**
* @param \Nette\ComponentModel\Container $obj
*/
protected function attached($obj)
{
parent::attached($obj);
if (!$obj instanceof UI\Presenter) {
return;
}
/** @var UI\Form|EntityForm $form */
$form = $this->getForm();
if (!$form->isSubmitted()) {
return;
}
foreach (array_keys($this->getHttpData()) as $id) {
$this->getComponent($id);
// eager initialize
}
}