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


PHP FLBuilderModel::get_node方法代码示例

本文整理汇总了PHP中FLBuilderModel::get_node方法的典型用法代码示例。如果您正苦于以下问题:PHP FLBuilderModel::get_node方法的具体用法?PHP FLBuilderModel::get_node怎么用?PHP FLBuilderModel::get_node使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FLBuilderModel的用法示例。


在下文中一共展示了FLBuilderModel::get_node方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_partial_refresh_data

 /**
  * Returns an array of partial refresh data.
  *
  * @since 1.7
  * @access private
  * @return array
  */
 private static function get_partial_refresh_data()
 {
     // Get the data if it's not cached.
     if (!self::$partial_refresh_data) {
         $post_data = FLBuilderModel::get_post_data();
         $partial_refresh = false;
         // Check for partial refresh if we have a node ID.
         if (isset($post_data['node_id'])) {
             // Get the node.
             $node_id = $post_data['node_id'];
             $node = FLBuilderModel::get_node($post_data['node_id']);
             // Check a module for partial refresh.
             if ($node && 'module' == $node->type) {
                 $node = FLBuilderModel::get_module($node_id);
                 $node_type = 'module';
                 $partial_refresh = $node->partial_refresh;
             } else {
                 if ($node) {
                     $node_type = $node->type;
                     $partial_refresh = self::node_modules_support_partial_refresh($node);
                 }
             }
         }
         // Clear the node data if we're not doing a partial refresh.
         if (!$partial_refresh) {
             $node_id = null;
             $node = null;
             $node_type = null;
         }
         // Cache the partial refresh data.
         self::$partial_refresh_data = array('is_partial_refresh' => $partial_refresh, 'node_id' => $node_id, 'node' => $node, 'node_type' => $node_type);
     }
     // Return the data.
     return self::$partial_refresh_data;
 }
开发者ID:onedaylabs,项目名称:onedaylabs.com,代码行数:42,代码来源:class-fl-builder-ajax-layout.php

示例2: render_column_modules_js

 /**
  * Renders the JavaScript for all modules in a single column.
  *
  * @since 1.7
  * @param string|object $col_id A column ID or object.
  * @return string
  */
 public static function render_column_modules_js($col_id)
 {
     $col = is_object($col_id) ? $col_id : FLBuilderModel::get_node($col_id);
     $nodes = FLBuilderModel::get_categorized_nodes();
     $compiled = array();
     $js = '';
     // Render the JS.
     foreach ($nodes['modules'] as $module) {
         if ($col->node == $module->parent) {
             $js .= self::render_module_js($module, $compiled);
         }
     }
     // Return the JS.
     return $js;
 }
开发者ID:Nirajjcu,项目名称:minime3d,代码行数:22,代码来源:class-fl-builder.php

示例3: render_column_settings

 /**
  * Renders the markup for the column settings lightbox.
  *
  * @since 1.0
  * @param string $node_id A column node ID.
  * @return void
  */
 public static function render_column_settings($node_id = null)
 {
     $post_data = FLBuilderModel::get_post_data();
     $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
     $node = FLBuilderModel::get_node($node_id);
     $settings = $node->settings;
     $form = FLBuilderModel::$settings_forms['col'];
     $global = FLBuilderModel::is_node_global($node);
     self::render_settings(array('class' => 'fl-builder-col-settings', 'attrs' => 'data-node="' . $node->node . '"', 'title' => $form['title'], 'badges' => $global ? array('global' => _x('Global', 'Indicator for global node templates.', 'fl-builder')) : array(), 'tabs' => $form['tabs']), $settings);
 }
开发者ID:komcdo,项目名称:iSSNA-WordPress,代码行数:17,代码来源:class-fl-builder.php

示例4: render_column_settings

 /**
  * Renders the markup for the column settings lightbox.
  *
  * @since 1.0
  * @param string $node_id A column node ID.
  * @return void
  */
 public static function render_column_settings($node_id = null)
 {
     $post_data = FLBuilderModel::get_post_data();
     $node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
     $node = FLBuilderModel::get_node($node_id);
     $settings = $node->settings;
     $form = FLBuilderModel::$settings_forms['col'];
     self::render_settings(array('class' => 'fl-builder-col-settings', 'attrs' => 'data-node="' . $node->node . '"', 'title' => $form['title'], 'tabs' => $form['tabs']), $settings);
 }
开发者ID:karthikakamalanathan,项目名称:wp-cookieLawInfo,代码行数:16,代码来源:class-fl-builder.php


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