private function addViewList($package, $entity, $propertyName, $type, $isMainProperty, $view) { $tpl = new Template(Template::SITE, ['generator', 'views', 'parts']); // views which do not have templates (like secondary templates: $propertyList2) if ($tpl->findTpl($view) === false) { return ''; } if ($isMainProperty && $type == 'enum' && !in_array($view, ['admin-editor', 'bus-editor', 'editor', 'form'])) { $propertyName .= 'Value'; } $tpl->set('package', $package); $tpl->set('entity', $entity); $tpl->set('property', $propertyName); $tpl->set('type', $type); $tpl->set('isMainProperty', $isMainProperty); return $tpl->render($view); }