本文整理汇总了PHP中Region::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Region::render方法的具体用法?PHP Region::render怎么用?PHP Region::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Region
的用法示例。
在下文中一共展示了Region::render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Page
define('INCLUDES_PATH', CORE_PATH . DS . "includes");
define('PLUGINS_PATH', BASE_PATH . DS . "plugins");
define('CLASSES_PATH', CORE_PATH . DS . "classes");
define('THEMES_PATH', BASE_PATH . DS . "themes");
require_once INCLUDES_PATH . DS . "functions.php";
require_once INCLUDES_PATH . DS . "config.php";
$registry = Registry::getInstance();
$page = new Page();
$page->setTitle('Magus v2.0: Electric Boogaloo');
$page->setTheme('default');
//Leave in for dependency injection. Get the theme
//var from registry when it's available
$page->setRegion('header', "Magus v2.0: Electric Boogaloo");
$page->setRegion('left_sidebar', "Tada!!!");
$page->setRegion('right_sidebar', "Wicked");
$page->setRegion('footer', "BAM!! Footer");
$left_sidebar = new Region();
$template = new Template();
$template->setPath(THEMES_PATH . DS . $registry->setting('theme') . DS . "templates");
$template->setTemplate('danfro');
$left_sidebar->addPlugin('Template', $template, 8);
$template = new Template();
$template->setPath(THEMES_PATH . DS . $registry->setting('theme') . DS . "templates");
$template->setTemplate('test_subject');
$left_sidebar->addPlugin('Template', $template, 6);
/*$left_sidebar->addPlugin('test', 0, 'Stuff', array('test', 'nothin'), 'relaxed', 1121);
$left_sidebar->addPlugin('newtest', 50, "other stuff");
$left_sidebar->addPlugin('third_test', 10, "more stuff");
$left_sidebar->addPlugin('forth_test', 5, "forth stuff");*/
$page->setRegion('left_sidebar', $left_sidebar->render());
print $page->render();