Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F355943
Get_CustomField_for_Project
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
devurandom
Apr 1 2015, 3:46 PM
2015-04-01 15:46:39 (UTC+0)
Size
689 B
Referenced Files
None
Subscribers
None
Get_CustomField_for_Project
View Options
function getField($object, $id, $user) {
$fields = PhabricatorCustomField::getObjectFields($object, PhabricatorCustomField::ROLE_VIEW)
->setViewer($user)
->readFieldsFromStorage($object)
->getFields();
$field = $fields[$id]
->getProxy()
->getFieldValue();
return $field;
}
$projects = id(new PhabricatorProjectQuery())
->setViewer($admin)
->execute();
foreach ($projects as $project) {
print("proj: " . $project->getName() . "\n");
$ldap_dn = getField($project, "std:project:test", $admin);
print(" std:project:test = " . $ldap_dn . "\n");
}
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/ex/4h/2tjbnde27bmsnkm7
Default Alt Text
Get_CustomField_for_Project (689 B)
Attached To
Mode
P1748 Get CustomField for Project
Attached
Detach File
Event Timeline
Log In to Comment