本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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);
}