/** * @return array the array of image type and label */ public static function getImageTypes() { if (!isset(self::$image_types)) { require_once JPATH_ADMINISTRATOR . '/components/com_zoo/config.php'; $applications = self::getZooApplications(); $list = array(); foreach ($applications as $application) { $types = $application->getTypes(); foreach ($types as $type) { $elements = $type->getElements(); foreach ($elements as $element) { $sprocket_type = RokSprocket_Provider_Zoo_FieldProcessorFactory::getSprocketType($element->getElementType()); if ($sprocket_type == 'image') { $key = 'image_field_' . $element->identifier; $list[$key] = array(); $list[$key]['group'] = $application->id . '_' . $type->id; $list[$key]['display'] = $element->config->name; } } } } self::sortTypes($list); self::$image_types = $list; } return self::$image_types; }