public static function getTypes() { if (is_null(self::$types)) { jimport('joomla.filesystem.folder'); self::$types = JFolder::folders(JPATH_ADMINISTRATOR . '/components/com_k2/extrafields'); } return self::$types; }