public static function getPossibleTypes()
{
$possibleTypes = [self::BLOCK, self::HOMEPAGE, self::WIDGET];
return $possibleTypes;
}
/** * @param string $type * @return self */ public static function withType($type) { return new self(sprintf('%s is not a valid module extra type. Possible options are %s', $type, implode(', ', ModuleExtraType::getPossibleTypes()))); }