Page MenuHomePhorge

PhabricatorUIExample.php
No OneTemporary

Size
1010 B
Referenced Files
None
Subscribers
None

PhabricatorUIExample.php

<?php
abstract class PhabricatorUIExample extends Phobject {
private $request;
public function setRequest($request) {
$this->request = $request;
return $this;
}
public function getRequest() {
return $this->request;
}
abstract public function getName();
abstract public function getDescription();
abstract public function renderExample();
public function getCategory() {
return pht('General');
}
protected function createBasicDummyHandle($name, $type, $fullname = null,
$uri = null) {
$id = mt_rand(15, 9999);
$handle = new PhabricatorObjectHandle();
$handle->setName($name);
$handle->setType($type);
$handle->setPHID(PhabricatorPHID::generateNewPHID($type));
if ($fullname) {
$handle->setFullName($fullname);
} else {
$handle->setFullName(
sprintf('%s%d: %s',
substr($type, 0, 1),
$id,
$name));
}
if ($uri) {
$handle->setURI($uri);
}
return $handle;
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 12, 1:16 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
115659
Default Alt Text
PhabricatorUIExample.php (1010 B)

Event Timeline