Render the individual element based on the action provided. Note that view names
for the associated actions are set in the model.
protected renderElement ( BaseEventTypeElement $element, string $action, BaseCActiveBaseEventTypeCActiveForm $form, array $data, array $view_data = [], boolean $return = false, boolean $processOutput = false ) | ||
$element | BaseEventTypeElement | |
$action | string | |
$form | BaseCActiveBaseEventTypeCActiveForm | |
$data | array | |
$view_data | array | Data to be passed to the view. |
$return | boolean | Whether the rendering result should be returned instead of being displayed to end users. |
$processOutput | boolean | Whether the rendering result should be postprocessed using processOutput. |
/** * Override action value when action is step to be update. * * @param BaseEventTypeElement $element * @param string $action * @param BaseCActiveBaseEventTypeCActiveForm $form * @param array $data * @param array $view_data * @param bool $return * @param bool $processOutput */ protected function renderElement($element, $action, $form, $data, $view_data = array(), $return = false, $processOutput = false) { if ($action == 'step') { $action = 'update'; } $class_array = ''; if (!empty($element)) { $cls = get_class($element); if (!empty($cls)) { $class_array = explode('\\', get_class($element)); } } $active_check_value = ""; if (!empty($class_array)) { if (array_pop($class_array) === 'Element_OphCiExamination_CataractSurgicalManagement') { $active_check = \SettingInstallation::model()->find('t.key="city_road_satellite_view"'); if (!empty($active_check)) { $active_check_value = $active_check->value; } } } $view_data = array_merge(array('active_check' => $active_check_value), $view_data); parent::renderElement($element, $action, $form, $data, $view_data, $return, $processOutput); }
/** * Override action value when action is step to be update. * * @param BaseEventTypeElement $element * @param string $action * @param BaseCActiveBaseEventTypeCActiveForm $form * @param array $data * @param array $view_data * @param bool $return * @param bool $processOutput */ protected function renderElement($element, $action, $form, $data, $view_data = array(), $return = false, $processOutput = false) { if ($action == 'step') { $action = 'update'; } parent::renderElement($element, $action, $form, $data, $view_data, $return, $processOutput); }