$this->getList(), 'tpl' => $this->getTemplate('list.tpl'), ]; $item['id'] = $id; $this->_doc->addScript('js/app/tab.js'); $this->_doc->addReadyObject('app.tab.Container', [compact('id')]); $this->_addItem($item); } protected function getList() { $list = $this->_getDataObj()->getList(); foreach ($list as &$tab) { if ($tab['type'] == Entity::TYPE_CAREERS) { $tab['content'] .= $this->people()->renderCareers(); } else if ($tab['type'] == Entity::TYPE_OUR_TEAM) { $tab['content'] .= $this->people()->renderTeam(); } } return $list; } protected function people() { static $view; if (null === $view) { $view = new OurTeamView(['doc' => $this->_doc]); } return $view; } }