本文整理匯總了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);
}