本文整理匯總了PHP中Block::set_type方法的典型用法代碼示例。如果您正苦於以下問題:PHP Block::set_type方法的具體用法?PHP Block::set_type怎麽用?PHP Block::set_type使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Block
的用法示例。
在下文中一共展示了Block::set_type方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Block
?>
<?php
$block2 = new Block('be-theme-pro-footer-col-2');
?>
<?php
$block2->set_global(true);
?>
<?php
$block2->set_size('span4');
?>
<?php
$block2->html('{content}');
?>
<?php
$block2->set_type('links');
?>
<?php
$block3 = new Block('be-theme-pro-footer-col-3');
?>
<?php
$block3->set_global(true);
?>
<?php
$block3->set_size('span4');
?>
<?php
$block3->html('<div class="widget">{content}</div>');
?>
<?php
示例2: Block
<p>Duis a risus sed dolor placerat semper quis in urna. Nam risus magna, fringilla sit amet blandit viverra, dignissim eget est. Ut commodo ullamcorper risus nec mattis. Donec aliquet convallis tortor, et placerat quam posuere posuere. Morbi tincidunt posuere turpis eu laoreet. Nulla facilisi. Aenean at massa leo. Vestibulum in varius arcu.</p>
<hr />
<!-- Resume -->
');
?>
<?php
$holder->add_block($block1);
?>
<!-- 2nd Line of Blocks -->
<?php
$block2 = new Block('business-commodore-1-theme-resume-content');
?>
<?php
$block2->set_type('resume');
?>
<?php
$block2->set_resizable(false);
?>
<?php
$block2->add_css_class('resume');
?>
<?php
$holder->add_block($block2);
?>
<!-- 3rd Line of Blocks -->
<?php
示例3: Block
function add_block($parent, $type)
{
$page_path = $_POST['page_path'];
PC::page_paths($page_path);
$this->BuilderEngine->set_page_path($page_path);
//$this->blocks->set_page_path($this->blocks->get_page_path_of($parent));
$max_id = $this->blocks->get_max_block_id();
$new_id = $max_id + 1;
$new_block_name = "custom-block-" . $new_id;
$block = new Block($parent);
$block->load();
$new_block = new Block($new_block_name);
$new_block->set_type($type);
if (isset($_POST['data_class']) && $_POST['data_class'] != "") {
$new_block->add_css_class($_POST['data_class']);
}
if ($block->is_global()) {
$new_block->set_global(true);
}
$block->add_block_first($new_block);
$block->save();
$new_block->set_content("Your new block.");
$new_block->show();
}
示例4: Block
?>
<?php
$line3->add_css_class('row');
?>
<?php
$block31 = new Block('business-commodore-1-theme-contact-line3-col1');
?>
<?php
$block31->set_size('span6');
?>
<?php
$block31->html('<div class="cwell">{content}</div>');
?>
<?php
$block31->set_type('contact_form');
?>
<?php
$block32 = new Block('business-commodore-1-theme-contact-line3-col2');
?>
<?php
$block32->set_size('span6');
?>
<?php
$block32->html('<div class="cwell">{content}</div>');
?>
<?php
$block32->set_content('
<h5>Address</h5>
<hr />
<div class="address">
示例5: Block
<!-- para -->
<p>Praesent at tellus porttitor nisl porttitor sagittis. Mauris in massa ligula, a tempor nulla. Ut tempus interdum mauris vel vehicula. Nulla ullamcorper tortor commodo in sagittis est accumsan.</p>
');
?>
<?php
$line2->set_size('span12');
?>
<!-- 2nd Line of Blocks -->
<!-- FAQ -->
<?php
$line3 = new Block('business-commodore-1-theme-page-faq-content');
?>
<?php
$line3->set_type('faq');
?>
<!-- 3rd Line of Blocks -->
<?php
$line4 = new Block('business-commodore-1-theme-faq-lower');
?>
<?php
$line4->add_css_class('row');
?>
<?php
$line4->add_css_class('cta');
?>
<?php
$line4->set_resizable(false);
示例6: Block
<?php
$block2->set_content('
<img src="' . get_theme_path() . 'img/beland1.jpg" alt="" />
');
?>
<?php
$line3->add_block($block2);
?>
<!-- 4th Line of Blocks -->
<?php
$line4 = new Block("rpost-test");
?>
<?php
$line4->set_type('pro_rpost');
?>
<?php
$line4->set_size('span12');
$content_holder->add_block($line1);
$content_holder->add_block($line2);
$content_holder->add_block($line3);
$content_holder->add_block($line4);
$content_holder->show();
?>
</div>
</div>
</div>
</div>
<!-- Content ends -->
示例7: Block
<?php
$block1->show();
?>
<?php
$block2 = new Block('be-theme-pro-header-social');
?>
<?php
$block2->set_global(true);
?>
<?php
$block2->add_css_class('offset3');
?>
<?php
$block2->set_type('social_links');
?>
<?php
$block2->set_size('span4');
?>
<?php
$block2->show();
?>
</div>
</div>
</header>
<!-- Navigation Starts -->
示例8: Block
function add_block($parent, $type)
{
$page_path = $_POST['page_path'];
PC::page_paths($page_path);
$this->BuilderEngine->set_page_path($page_path);
//$this->blocks->set_page_path($this->blocks->get_page_path_of($parent));
$max_id = $this->blocks->get_max_block_id();
$new_id = $max_id + 1;
$new_block_name = "custom-block-" . $new_id;
$block = new Block($parent);
$block->load();
$new_block = new Block($new_block_name);
$new_block->set_type($type);
$block->add_block($new_block);
$block->save();
$new_block->set_content("Your new block.");
$new_block->show();
}