Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102013206
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
Sun, Feb 16, 04:45
Size
944 B
Mime Type
text/x-php
Expires
Tue, Feb 18, 04:45 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24222283
Attached To
rPH Phabricator
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
();
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