Page MenuHomec4science

PhabricatorStandardCustomFieldDatasource.php
No OneTemporary

File Metadata

Created
Sun, Dec 29, 03:26

PhabricatorStandardCustomFieldDatasource.php

<?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