Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121785729
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, Jul 13, 21:34
Size
704 B
Mime Type
text/x-php
Expires
Tue, Jul 15, 21:34 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27390909
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