You are here

public function MenuBeanType::view in Menu Bean 7

Return the block content.

Parameters

$bean: The bean object being viewed.

$content: The default content array created by Entity API. This will include any fields attached to the entity.

$view_mode: The view mode passed into $entity->view().

Return value

Return a renderable content array.

Overrides BeanPlugin::view

File

plugins/MenuBeanType.class.php, line 34

Class

MenuBeanType

Code

public function view($bean, $content, $view_mode = 'default', $langcode = NULL) {
  $altertree = array();
  $tree = menu_bean_load_setting_class(menu_bean_get_initial_plugin_key())
    ->alterTree($altertree, $bean);
  $settings = menu_bean_get_settings();
  foreach ($settings as $key => $class) {
    menu_bean_load_setting_class($key)
      ->alterTree($tree, $bean);
  }
  return menu_tree_output($tree);
}