Perforce Chronicle 2012.2/486814
API Documentation
|
A widget that displays the categories associated with content, when content is being displayed. More...
Public Member Functions | |
indexAction () | |
Display the text stored in the widget. | |
Static Public Member Functions | |
static | getConfigSubForm ($widget) |
Get config sub-form to present additional options when configuring a widget of this type. |
A widget that displays the categories associated with content, when content is being displayed.
static Category_AssociatedCategoriesWidgetController::getConfigSubForm | ( | $ | widget | ) | [static] |
Get config sub-form to present additional options when configuring a widget of this type.
P4Cms_Widget | $widget | the widget instance being configured. |
{ return new Category_Form_AssociatedCategoriesWidget; }
Category_AssociatedCategoriesWidgetController::indexAction | ( | ) |
Display the text stored in the widget.
{ $this->view->display = false; $this->view->preamble = $this->getOption('preamble'); $this->view->categories = array(); $context = $this->widgetContext->getValues(); if ($context and array_key_exists('contentId', $context)) { $categories = Category_Model_Category::fetchAllByEntry($context['contentId']); $this->view->categories = $categories; $this->view->display = true; } }