當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。