/**
* Render the individual element based on the action provided. Note that view names
* for the associated actions are set in the model.
*
* @param BaseEventTypeElement $element
* @param string $action
* @param BaseCActiveBaseEventTypeCActiveForm $form
* @param array $data
* @param array $view_data Data to be passed to the view.
* @param boolean $return Whether the rendering result should be returned instead of being displayed to end users.
* @param boolean $processOutput Whether the rendering result should be postprocessed using processOutput.
* @throws Exception
*/
protected function renderElement($element, $action, $form, $data, $view_data = array(), $return = false, $processOutput = false)
{
// Get the view names from the model.
$view = isset($element->{$action . '_view'}) ? $element->{$action . '_view'} : $element->getDefaultView();
$container_view = isset($element->{'container_' . $action . '_view'}) ? $element->{'container_' . $action . '_view'} : $element->getDefaultContainerView();
$use_container_view = $element->useContainerView && $container_view;
$view_data = array_merge(array('element' => $element, 'data' => $data, 'form' => $form, 'child' => $element->getElementType()->isChild(), 'container_view' => $container_view), $view_data);
// Render the view.
$use_container_view && $this->beginContent($container_view, $view_data);
$this->renderPartial($this->getElementViewPathAlias($element) . $view, $view_data, $return, $processOutput);
$use_container_view && $this->endContent();
}