当前位置: 首页>>代码示例>>PHP>>正文


PHP FlexicontentFields::getPropertySupport_BuiltIn方法代码示例

本文整理汇总了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};
 }
开发者ID:jakesyl,项目名称:flexicontent,代码行数:58,代码来源:flexicontent.fields.php


注:本文中的FlexicontentFields::getPropertySupport_BuiltIn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。