public static function getDefinitions() { if (is_null(self::$definitions)) { jimport('joomla.filesystem.file'); $definitions = array(); $types = self::getTypes(); foreach ($types as $type) { $extraField = new K2ExtraFields(array('id' => null, 'type' => '', 'value' => '')); $extraField->type = $type; $definitions[$type] = $extraField->getDefinition(); } self::$definitions = $definitions; } return self::$definitions; }