Created
August 20, 2010 14:54
-
-
Save sirkitree/540479 to your computer and use it in GitHub Desktop.
Simple panels 'block' (php, drupal, panels) #
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugins are described by creating a $plugin array which will be used | |
* by the system that includes this file. | |
*/ | |
$plugin = array( | |
'title' => t('Work Wizard Menu'), | |
'description' => t('This is the menu for the work wizard.'), | |
'single' => TRUE, | |
'content_types' => array('work_wizard_menu'), | |
'render callback' => 'work_wizard_content_type_render', | |
'category' => array(t('Work Wizard')), | |
); | |
/** | |
* Run-time rendering of the body of the block. | |
* | |
* @param $subtype | |
* @param $conf | |
* Configuration as done at admin time. | |
* @param $args | |
* @param $context | |
* Context - in this case we don't have any. | |
* | |
* @return | |
* An object with at least title and content members. | |
*/ | |
function work_wizard_content_type_render($subtype, $conf, $args, $context) { | |
$block = new stdClass(); | |
// The title actually used in rendering | |
$block->title = check_plain("Work Wizard Menu"); | |
$block->content = _work_wizard_menu(); | |
return $block; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment