本文整理汇总了PHP中FLBuilderModel::add_col_group方法的典型用法代码示例。如果您正苦于以下问题:PHP FLBuilderModel::add_col_group方法的具体用法?PHP FLBuilderModel::add_col_group怎么用?PHP FLBuilderModel::add_col_group使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FLBuilderModel
的用法示例。
在下文中一共展示了FLBuilderModel::add_col_group方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_new_column_group
/**
* Renders the layout data for a new column group.
*
* @since 1.7
* @param string $node_id The node ID of a row to add the new group to.
* @param string $cols The type of column layout to use.
* @param int $position The position of the new column group in the row.
* @return array
*/
public static function render_new_column_group($node_id, $cols = '1-col', $position = false)
{
// Add the group.
$group = FLBuilderModel::add_col_group($node_id, $cols, $position);
// Render the group.
ob_start();
FLBuilder::render_column_group($group);
$html = ob_get_clean();
// Return the response.
return array('partial' => true, 'nodeType' => $group->type, 'html' => $html, 'js' => 'FLBuilder._renderLayoutComplete();');
}
示例2: render_new_column_group
/**
* Adds a new column group and renders it.
*
* @since 1.0
* @param string $node_id The node ID of a row to add the new group to.
* @param string $cols The type of column layout to use.
* @param int $position The position of the new column group in the row.
* @return void
*/
public static function render_new_column_group($node_id = null, $cols = '1-col', $position = false)
{
$post_data = FLBuilderModel::get_post_data();
$node_id = isset($post_data['node_id']) ? $post_data['node_id'] : $node_id;
$cols = isset($post_data['cols']) ? $post_data['cols'] : $cols;
$position = isset($post_data['position']) ? (int) $post_data['position'] : $position;
$group = FLBuilderModel::add_col_group($node_id, $cols, $position);
self::render_column_group($group);
if (defined('DOING_AJAX')) {
die;
}
}