Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F546525
PhabricatorUIExample.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1010 B
Referenced Files
None
Subscribers
None
PhabricatorUIExample.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment