/** * Get list of all index and derived attributes * @return array of all attributes */ public static function getAllAttributes() { $contact = new Contact(); $adapter = new ContactWebFormModelAttributesAdapter($contact); $attributes = $adapter->getAttributes(); $attributes = ArrayUtil::subValueSort($attributes, 'attributeLabel', 'asort'); return $attributes; }
/** * Get list of all index and derived attributes that can be placed on any web form * @return array of all attributes */ public static function getAllAttributes() { $contact = new Contact(); $adapter = new ContactWebFormModelAttributesAdapter($contact); $attributes = $adapter->getAttributes(); $placeAbleAttributes = array(); foreach ($attributes as $attributeName => $attributeData) { if (!$attributeData['isReadOnly'] && $attributeName != 'googleWebTrackingId') { $placeAbleAttributes[$attributeName] = $attributeData; } } $placeAbleAttributes = ArrayUtil::subValueSort($placeAbleAttributes, 'attributeLabel', 'asort'); return $placeAbleAttributes; }