final public function getTypeConstant()Inherited
wild |
public function getTypeName()
wild |
public function getTypeIcon()Inherited
wild |
public function newObject()
wild |
public function getPHIDTypeApplicationClass()
Get the class name for the application this type belongs to.
string|null | Class name of the corresponding application, or null if the type is not bound to an application. |
protected function buildQueryForObjects($object_query, $phids)
Build a PhabricatorPolicyAwareQuery to load objects of this type by PHID.
If you can not build a single query which satisfies this requirement, you can provide a dummy implementation for this method and overload loadObjects() instead.
PhabricatorObjectQuery | $query | Query being executed. |
list<phid> | $phids | PHIDs to load. |
PhabricatorPolicyAwareQuery | Query object which loads the specified PHIDs when executed. |
public function loadObjects($object_query, $phids)
Load objects of this type, by PHID. For most PHID types, it is only necessary to implement buildQueryForObjects() to get object loading to work.
PhabricatorObjectQuery | $query | Query being executed. |
list<phid> | $phids | PHIDs to load. |
list<wild> | Corresponding objects. |
public function loadHandles($query, $handles, $objects)
Populate provided handles with application-specific data, like titles and URIs.
Because of this guarantee, a safe implementation will typically look like*
foreach ($handles as $phid => $handle) { $object = $objects[$phid]; $handle->setStuff($object->getStuff()); // ... }
In general, an implementation should call setName() and setURI() on each handle at a minimum. See PhabricatorObjectHandle for other handle properties.
PhabricatorHandleQuery | $query | Issuing query object. |
list<PhabricatorObjectHandle> | $handles | Handles to populate with data. |
list<Object> | $objects | Objects for these PHIDs loaded by @{method:buildQueryForObjects()}. |
void |
public function canLoadNamedObject($name)Inherited
$name |
wild |
public function loadNamedObjects($query, $names)Inherited
PhabricatorObjectQuery | $query | |
array | $names |
wild |
final public static function getAllTypes()Inherited
Get all known PHID types.
To get PHID types a given user has access to, see getAllInstalledTypes().
dict<string, PhabricatorPHIDType> | Map of type constants to types. |
final public static function getTypes($types)Inherited
array | $types |
wild |
private static function newClassMapQuery()Inherited
wild |
public static function getAllInstalledTypes($viewer)Inherited
Get all PHID types of applications installed for a given viewer.
PhabricatorUser | $viewer | Viewing user. |
dict<string, PhabricatorPHIDType> | Map of constants to installed types. |