Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93855937
PhabricatorUIExample.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Dec 2, 01:21
Size
912 B
Mime Type
text/x-php
Expires
Wed, Dec 4, 01:21 (2 d)
Engine
blob
Format
Raw Data
Handle
22715021
Attached To
rPH Phabricator
PhabricatorUIExample.php
View Options
<?php
abstract
class
PhabricatorUIExample
{
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
();
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
;
}
}
Event Timeline
Log In to Comment