Page MenuHomePhabricator
Paste P1190

read_fields.php
ActivePublic

Authored by epriestley on Jun 30 2014, 8:19 PM.
Tags
None
Referenced Files
F172578: read_fields.php
Jun 30 2014, 8:19 PM
Subscribers
None
$field_list = PhabricatorCustomField::getObjectFields(
$task,
PhabricatorCustomField::ROLE_DEFAULT);
$field_list->setViewer($user);
$field_list->readFieldsFromStorage($task);
foreach ($field_list->getFields() as $field) {
$key = $field->getFieldKey();
$value = $field->getValueForStorage();
// Do something with $key and $value.
}

Event Timeline

epriestley changed the title of this paste from untitled to read_fields.php.
epriestley updated the paste's language from autodetect to autodetect.