/** * Extract and return the section name off of the given $data * * @param array $data * * @return string * * @throws ProgrammingError In case no valid section name is available */ protected function extractSectionName(array &$data) { $keyColumn = $this->ds->getConfigObject()->getKeyColumn(); if (!isset($data[$keyColumn])) { throw new ProgrammingError('$data does not provide a value for key column "%s"', $keyColumn); } $section = $data[$keyColumn]; unset($data[$keyColumn]); return $section; }
/** * Set the shared navigation configuration * * @param Config $config * * @return $this */ public function setShareConfig(Config $config) { $config->getConfigObject()->setKeyColumn('name'); $this->shareConfig = $config; return $this; }