本文整理匯總了PHP中plgFabrik_Element::isJoin方法的典型用法代碼示例。如果您正苦於以下問題:PHP plgFabrik_Element::isJoin方法的具體用法?PHP plgFabrik_Element::isJoin怎麽用?PHP plgFabrik_Element::isJoin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類plgFabrik_Element
的用法示例。
在下文中一共展示了plgFabrik_Element::isJoin方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isJoin
/**
* does the element store its data in a join table (1:n)
* @return bool
*/
public function isJoin()
{
$params = $this->getParams();
if ($params->get('ajax_upload') && (int) $params->get('ajax_max', 4) > 1) {
return true;
} else {
return parent::isJoin();
}
}
示例2: makeParentElement
/**
* For processing repeat elements we need to make its
* parent id element during the form process
*
* @param plgFabrik_Element $baseElement repeat element (e.g. db join rendered as checkbox)
*
* @return plgFabrik_ElementField
*/
public static function makeParentElement($baseElement)
{
$pluginManager = FabrikWorker::getPluginManager();
$groupModel = $baseElement->getGroupModel();
$elementModel = $pluginManager->getPlugIn('field', 'element');
$elementModel->getElement()->name = 'parent_id';
$elementModel->getParams()->set('repeat', $baseElement->isJoin());
$elementModel->getElement()->group_id = $groupModel->getId();
$elementModel->setGroupModel($baseElement->getGroupModel());
$elementModel->_joinModel = $groupModel->getJoinModel();
return $elementModel;
}
示例3: makeParentElement
/**
* For processing repeat elements we need to make its
* parent id element during the form process
*
* @param plgFabrik_Element $baseElement repeat element (e.g. db join rendered as checkbox)
*
* @return plgFabrik_ElementField
*/
public function makeParentElement($baseElement)
{
$pluginManager = FabrikWorker::getPluginManager();
$groupModel = $baseElement->getGroupModel();
$elementModel = $pluginManager->getPlugIn('field', 'element');
$elementModel->getElement()->name = 'parent_id';
$elementModel->getParams()->set('repeat', $baseElement->isJoin());
$elementModel->getElement()->group_id = $groupModel->getId();
$elementModel->setGroupModel($baseElement->getGroupModel());
// @TODO wrong when element in repeat group
$oJoin = $groupModel->getJoinModel()->getJoin();
$elementModel->_aFullNames['parent_id1_1__1_'] = $oJoin->table_join . '___parent_id';
return $elementModel;
}