本文整理汇总了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;
}