More changes to standardize with the new sidebar api
This commit is contained in:
parent
c625e416b2
commit
6941aa8fa7
|
@ -20,7 +20,17 @@
|
||||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
class <?= $module ?>_block {
|
class <?= $module ?>_block {
|
||||||
static function get($block_id) {
|
static function get_site_list() {
|
||||||
|
return array(
|
||||||
|
"<?= "{$module}_site" ?>" => t("<?= $name ?> Sidebar Block"));
|
||||||
|
}
|
||||||
|
|
||||||
|
static function get_admin_list() {
|
||||||
|
return array(
|
||||||
|
"<?= "{$module}_admin" ?>" => t("<?= $name ?> Dashboard Block"));
|
||||||
|
}
|
||||||
|
|
||||||
|
static function get($block_id, $theme) {
|
||||||
$block = new Block();
|
$block = new Block();
|
||||||
switch ($block_id) {
|
switch ($block_id) {
|
||||||
case "<?= "{$module}_admin" ?>":
|
case "<?= "{$module}_admin" ?>":
|
||||||
|
@ -40,14 +50,4 @@ class <?= $module ?>_block {
|
||||||
}
|
}
|
||||||
return $block;
|
return $block;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function get_site_list() {
|
|
||||||
return array(
|
|
||||||
"<?= "{$module}_site" ?>" => t("<?= $name ?> Sidebar Block"));
|
|
||||||
}
|
|
||||||
|
|
||||||
static function get_admin_list() {
|
|
||||||
return array(
|
|
||||||
"<?= "{$module}_admin" ?>" => t("<?= $name ?> Dashboard Block"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,150 +19,139 @@
|
||||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
class <?= $module ?>_theme {
|
class <?= $module ?>_theme {
|
||||||
static function sidebar_blocks($theme) {
|
|
||||||
$block = new Block();
|
|
||||||
$block->css_id = "g<?= $css_id ?>";
|
|
||||||
$block->title = t("<?= $name ?>");
|
|
||||||
$block->content = new View("<?= $module ?>_block.html");
|
|
||||||
|
|
||||||
$block->content->item = ORM::factory("item", 1);
|
|
||||||
|
|
||||||
return $block;
|
|
||||||
}
|
|
||||||
|
|
||||||
<? if (!empty($callbacks["album_blocks"])): ?>
|
<? if (!empty($callbacks["album_blocks"])): ?>
|
||||||
static function album_blocks($theme) {
|
static function album_blocks($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["album_bottom"])): ?>
|
<? if (!empty($callbacks["album_bottom"])): ?>
|
||||||
static function album_bottom($theme) {
|
static function album_bottom($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["album_top"])): ?>
|
<? if (!empty($callbacks["album_top"])): ?>
|
||||||
static function album_top($theme) {
|
static function album_top($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["admin_credits"])): ?>
|
<? if (!empty($callbacks["admin_credits"])): ?>
|
||||||
static function admin_credits($theme) {
|
static function admin_credits($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["photo"])): ?>
|
<? if (!empty($callbacks["photo"])): ?>
|
||||||
static function admin_footer($theme) {
|
static function admin_footer($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["admin_header_top"])): ?>
|
<? if (!empty($callbacks["admin_header_top"])): ?>
|
||||||
static function admin_header_top($theme) {
|
static function admin_header_top($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["admin_header_bottom"])): ?>
|
<? if (!empty($callbacks["admin_header_bottom"])): ?>
|
||||||
static function admin_header_bottom($theme) {
|
static function admin_header_bottom($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["admin_page_bottom"])): ?>
|
<? if (!empty($callbacks["admin_page_bottom"])): ?>
|
||||||
static function admin_page_bottom($theme) {
|
static function admin_page_bottom($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["admin_page_top"])): ?>
|
<? if (!empty($callbacks["admin_page_top"])): ?>
|
||||||
static function admin_page_top($theme) {
|
static function admin_page_top($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["admin_head"])): ?>
|
<? if (!empty($callbacks["admin_head"])): ?>
|
||||||
static function admin_head($theme) {
|
static function admin_head($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["credits"])): ?>
|
<? if (!empty($callbacks["credits"])): ?>
|
||||||
static function credits($theme) {
|
static function credits($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["dynamic_bottom"])): ?>
|
<? if (!empty($callbacks["dynamic_bottom"])): ?>
|
||||||
static function dynamic_bottom($theme) {
|
static function dynamic_bottom($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["dynamic_top"])): ?>
|
<? if (!empty($callbacks["dynamic_top"])): ?>
|
||||||
static function dynamic_top($theme) {
|
static function dynamic_top($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["footer"])): ?>
|
<? if (!empty($callbacks["footer"])): ?>
|
||||||
static function footer($theme) {
|
static function footer($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["head"])): ?>
|
<? if (!empty($callbacks["head"])): ?>
|
||||||
static function head($theme) {
|
static function head($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["header_bottom"])): ?>
|
<? if (!empty($callbacks["header_bottom"])): ?>
|
||||||
static function header_bottom($theme) {
|
static function header_bottom($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["header_top"])): ?>
|
<? if (!empty($callbacks["header_top"])): ?>
|
||||||
static function header_top($theme) {
|
static function header_top($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["page_bottom"])): ?>
|
<? if (!empty($callbacks["page_bottom"])): ?>
|
||||||
static function page_bottom($theme) {
|
static function page_bottom($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["pae_top"])): ?>
|
<? if (!empty($callbacks["pae_top"])): ?>
|
||||||
static function page_top($theme) {
|
static function page_top($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["photo_blocks"])): ?>
|
<? if (!empty($callbacks["photo_blocks"])): ?>
|
||||||
static function photo_blocks($theme) {
|
static function photo_blocks($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["photo_bottom"])): ?>
|
<? if (!empty($callbacks["photo_bottom"])): ?>
|
||||||
static function photo_bottom($theme) {
|
static function photo_bottom($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["photo_top"])): ?>
|
<? if (!empty($callbacks["photo_top"])): ?>
|
||||||
static function photo_top($theme) {
|
static function photo_top($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["sidebar_bottom"])): ?>
|
<? if (!empty($callbacks["sidebar_bottom"])): ?>
|
||||||
static function sidebar_bottom($theme) {
|
static function sidebar_bottom($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["sidebar_top"])): ?>
|
<? if (!empty($callbacks["sidebar_top"])): ?>
|
||||||
static function sidebar_top($theme) {
|
static function sidebar_top($theme) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["thumb_bottom"])): ?>
|
<? if (!empty($callbacks["thumb_bottom"])): ?>
|
||||||
static function thumb_bottom($theme, $child) {
|
static function thumb_bottom($theme, $child) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["thumb_info"])): ?>
|
<? if (!empty($callbacks["thumb_info"])): ?>
|
||||||
static function thumb_info($theme, $child) {
|
static function thumb_info($theme, $child) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? if (!empty($callbacks["thumb_top"])): ?>
|
<? if (!empty($callbacks["thumb_top"])): ?>
|
||||||
static function thumb_top($theme, $child) {
|
static function thumb_top($theme, $child) {
|
||||||
}
|
}
|
||||||
|
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue
Block a user