Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96287709
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
Tue, Dec 24, 14:25
Size
704 B
Mime Type
text/x-php
Expires
Thu, Dec 26, 14:25 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23150897
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