/** * Returns the icon URL from the parameter value. * * @param AbstractContent $content The content. * @param string $paramName The parameter name. * * @return string|null The icon URL. */ private function iconizeByParam(AbstractContent $content, $paramName) { if (null === ($parameter = $content->getParam($paramName))) { return null; } if (empty($parameter['value'])) { return null; } return $parameter['value']; }
/** * Returns defined parameters. * * @param string $key The parameter to be return, if NULL, all parameters are returned * * @return mixed the parameter value or NULL if unfound */ public function getParam($key) { return null !== $this->getDraft() ? $this->getDraft()->getParam($key) : parent::getParam($key); }