Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92653086
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
Fri, Nov 22, 10:13
Size
1010 B
Mime Type
text/x-php
Expires
Sun, Nov 24, 10:13 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22478884
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
();
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
;
}
}
Event Timeline
Log In to Comment