Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/customfield/AlmanacCoreCustomField.php
Show All 11 Lines | public function getFieldKey() { | ||||
return $this->getProxy()->getRawStandardFieldKey(); | return $this->getProxy()->getRawStandardFieldKey(); | ||||
} | } | ||||
public function getFieldName() { | public function getFieldName() { | ||||
return $this->getFieldKey(); | return $this->getFieldKey(); | ||||
} | } | ||||
public function createFields($object) { | public function createFields($object) { | ||||
if (!$object->getID()) { | |||||
return array(); | |||||
} | |||||
$specs = $object->getAlmanacPropertyFieldSpecifications(); | $specs = $object->getAlmanacPropertyFieldSpecifications(); | ||||
$default_specs = array(); | $default_specs = array(); | ||||
foreach ($object->getAlmanacProperties() as $property) { | foreach ($object->getAlmanacProperties() as $property) { | ||||
$default_specs[$property->getFieldName()] = array( | $default_specs[$property->getFieldName()] = array( | ||||
'name' => $property->getFieldName(), | 'name' => $property->getFieldName(), | ||||
'type' => 'text', | 'type' => 'text', | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |