本文整理汇总了PHP中WFView::id方法的典型用法代码示例。如果您正苦于以下问题:PHP WFView::id方法的具体用法?PHP WFView::id怎么用?PHP WFView::id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WFView
的用法示例。
在下文中一共展示了WFView::id方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addChild
function addChild(WFView $view)
{
if (!$view instanceof WFPassword) {
throw new WFException("Only WFPassword child views are accepted.");
}
if ($this->confirmPasswordId !== NULL) {
throw new WFException("WFPassword accepts only one child.");
}
$this->confirmPasswordId = $view->id();
$this->setValueForKey(false, 'autocomplete');
$view->setValueForKey(false, 'autocomplete');
return parent::addChild($view);
}
示例2: addChild
/**
* To implement our prototype functionality, we need to detect when a child object named "<id>Prototype" has been added.
*
* If a prototype object is detected, we set up the prototype for the WFDynamic.
*
* @param object WFView The object being added.
*/
function addChild(WFView $view)
{
if ($view->id() == "{$this->id}Prototype") {
$this->setPrototype($view);
} else {
// add new view to the "parentView" object
$parentView = $this->calculateParent();
if ($parentView) {
$parentView->addChild($view);
} else {
parent::addChild($view);
}
}
}
示例3: addChild
/**
* Add a child view to this view.
*
* @param object A WFView object to add.
*/
function addChild(WFView $view)
{
$this->children[$view->id()] = $view;
$view->setParent($this);
}