當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SiteOrigin_Widget::so_get_field_id方法代碼示例

本文整理匯總了PHP中SiteOrigin_Widget::so_get_field_id方法的典型用法代碼示例。如果您正苦於以下問題:PHP SiteOrigin_Widget::so_get_field_id方法的具體用法?PHP SiteOrigin_Widget::so_get_field_id怎麽用?PHP SiteOrigin_Widget::so_get_field_id使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SiteOrigin_Widget的用法示例。


在下文中一共展示了SiteOrigin_Widget::so_get_field_id方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: create_field

 public function create_field($field_name, $field_options, SiteOrigin_Widget $for_widget, $for_repeater = array(), $is_template = false)
 {
     $element_id = $for_widget->so_get_field_id($field_name, $for_repeater, $is_template);
     $element_name = $for_widget->so_get_field_name($field_name, $for_repeater);
     $field_class = $this->get_field_class_name($field_options['type']);
     if ($this->is_container_type($field_options['type'])) {
         return new $field_class($field_name, $element_id, $element_name, $field_options, $for_widget, $for_repeater);
     } else {
         return new $field_class($field_name, $element_id, $element_name, $field_options);
     }
 }
開發者ID:MichaelEniolade,項目名稱:MechrisPlanetWebsite,代碼行數:11,代碼來源:factory.class.php

示例2: create_field

 public function create_field($field_name, $field_options, SiteOrigin_Widget $for_widget, $for_repeater = array(), $is_template = false)
 {
     $element_id = $for_widget->so_get_field_id($field_name, $for_repeater, $is_template);
     $element_name = $for_widget->so_get_field_name($field_name, $for_repeater);
     if (empty($field_options['type'])) {
         $field_options['type'] = 'text';
         $field_options['label'] = __('This field does not have a type. Please specify a type for it to be rendered correctly.', 'so-widgets-bundle');
     }
     $field_class = $this->get_field_class_name($field_options['type']);
     // If we still don't have a class use the 'SiteOrigin_Widget_Field_Error' class to indicate this to the user.
     if (!class_exists($field_class)) {
         return new SiteOrigin_Widget_Field_Error('', '', '', array('type' => 'error', 'message' => 'The class \'' . $field_class . '\' could not be found. Please make sure you specified the correct field type and that the class exists.'));
     }
     return new $field_class($field_name, $element_id, $element_name, $field_options, $for_widget, $for_repeater);
 }
開發者ID:jesusmarket,項目名稱:jesusmarket,代碼行數:15,代碼來源:factory.class.php

示例3: create_field

 public function create_field($field_name, $field_options, SiteOrigin_Widget $for_widget, $for_repeater = array(), $is_template = false)
 {
     $element_id = $for_widget->so_get_field_id($field_name, $for_repeater, $is_template);
     $element_name = $for_widget->so_get_field_name($field_name, $for_repeater);
     if (empty($field_options['type'])) {
         $field_options['type'] = 'text';
         $field_options['label'] = __('This field does not have a type. Please specify a type for it to be rendered correctly.', 'siteorigin-widgets');
     }
     $field_class = $this->get_field_class_name($field_options['type']);
     if ($this->is_container_type($field_options['type'])) {
         return new $field_class($field_name, $element_id, $element_name, $field_options, $for_widget, $for_repeater);
     } else {
         return new $field_class($field_name, $element_id, $element_name, $field_options);
     }
 }
開發者ID:ninefinecode,項目名稱:ninefinecode,代碼行數:15,代碼來源:factory.class.php


注:本文中的SiteOrigin_Widget::so_get_field_id方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。