public static function withConfigName($config, $name, $title = null, $value = '') { $instance = new self($name, $title, $value); $instance->setConfigName($config); //it's safe to call it again in here, just in case it's used outside of LeftAndMain layout - by giving the customScript a name we do ensure, that it's only included once self::include_js(); }