本文整理汇总了PHP中FlexicontentFields::getPropertySupport_BuiltIn方法的典型用法代码示例。如果您正苦于以下问题:PHP FlexicontentFields::getPropertySupport_BuiltIn方法的具体用法?PHP FlexicontentFields::getPropertySupport_BuiltIn怎么用?PHP FlexicontentFields::getPropertySupport_BuiltIn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FlexicontentFields
的用法示例。
在下文中一共展示了FlexicontentFields::getPropertySupport_BuiltIn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPropertySupport
static function getPropertySupport($field_type, $iscore, $spname = null)
{
static $fi = null;
if ($fi === null) {
$fi = FlexicontentFields::getPropertySupport_BuiltIn();
}
static $cparams = null;
if ($cparams === null) {
$cparams = JComponentHelper::getParams('com_flexicontent');
}
static $support_ft = array();
if (isset($support_ft[$field_type])) {
return !$spname ? $support_ft[$field_type] : $support_ft[$field_type]->{$spname};
}
// Existing fields with field type
if ($field_type) {
// Make sure that the Joomla plugin that implements the type of current flexi field, has been imported
//JPluginHelper::importPlugin('flexicontent_fields', $field_type);
FLEXIUtilities::call_FC_Field_Func($iscore ? 'core' : $field_type, null, null);
// Get Methods implemented by the field
$classname = 'plgFlexicontent_fields' . ($iscore ? 'core' : $field_type);
$classmethods = get_class_methods($classname);
// SEARCH/FILTER related properties
$supportsearch = $iscore ? in_array($field_type, $fi->core_search) : in_array('onIndexSearch', $classmethods);
$supportfilter = $iscore ? in_array($field_type, $fi->core_filters) : in_array('onDisplayFilter', $classmethods);
$supportadvsearch = $iscore ? in_array($field_type, $fi->core_advsearch) : in_array('onIndexAdvSearch', $classmethods);
$supportadvfilter = $iscore ? in_array($field_type, $fi->core_advfilters) : in_array('onAdvSearchDisplayFilter', $classmethods);
// ITEM FORM related properties
$supportuntranslatable = !$iscore || $field_type == 'maintext';
$supportvalueseditable = !$iscore || $field_type == 'maintext';
$supportformhidden = !$iscore || $field_type == 'maintext';
$supportedithelp = !$iscore || $field_type == 'maintext';
// New fields without field type
} else {
// SEARCH/FILTER related properties
$supportsearch = false;
$supportfilter = false;
$supportadvsearch = false;
$supportadvfilter = false;
// ITEM FORM related properties
$supportuntranslatable = !$iscore;
$supportvalueseditable = !$iscore;
$supportformhidden = !$iscore;
$supportedithelp = !$iscore;
}
// This property is usable only when Translation Groups are enabled
$supportuntranslatable = $supportuntranslatable && $cparams->get('enable_translation_groups');
$support_ft[$field_type] = new stdClass();
$support_ft[$field_type]->supportsearch = $supportsearch;
$support_ft[$field_type]->supportfilter = $supportfilter;
$support_ft[$field_type]->supportadvsearch = $supportadvsearch;
$support_ft[$field_type]->supportadvfilter = $supportadvfilter;
$support_ft[$field_type]->supportuntranslatable = $supportuntranslatable;
$support_ft[$field_type]->supportvalueseditable = $supportvalueseditable;
$support_ft[$field_type]->supportformhidden = $supportformhidden;
$support_ft[$field_type]->supportedithelp = $supportedithelp;
return !$spname ? $support_ft[$field_type] : $support_ft[$field_type]->{$spname};
}