Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96624262
PhabricatorStandardCustomFieldDatasource.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, Dec 29, 03:26
Size
704 B
Mime Type
text/x-php
Expires
Tue, Dec 31, 03:26 (2 d)
Engine
blob
Format
Raw Data
Handle
23218220
Attached To
rPH Phabricator
PhabricatorStandardCustomFieldDatasource.php
View Options
<?php
final
class
PhabricatorStandardCustomFieldDatasource
extends
PhabricatorStandardCustomFieldTokenizer
{
public
function
getFieldType
()
{
return
'datasource'
;
}
public
function
getDatasource
()
{
$parameters
=
$this
->
getFieldConfigValue
(
'datasource.parameters'
,
array
());
$class
=
$this
->
getFieldConfigValue
(
'datasource.class'
);
$parent
=
'PhabricatorTypeaheadDatasource'
;
if
(!
is_subclass_of
(
$class
,
$parent
))
{
throw
new
Exception
(
pht
(
'Configured datasource class "%s" must be a valid subclass of '
.
'"%s".'
,
$class
,
$parent
));
}
return
newv
(
$class
,
array
())
->
setParameters
(
$parameters
);
}
}
Event Timeline
Log In to Comment