public function SolrDocumentFactory::create in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 src/SolrDocumentFactory.php \Drupal\search_api_solr\SolrDocumentFactory::create()
- 8.2 src/SolrDocumentFactory.php \Drupal\search_api_solr\SolrDocumentFactory::create()
Throws
\Drupal\Component\Plugin\Exception\PluginNotFoundException
Overrides SolrDocumentFactoryInterface::create
File
- src/
SolrDocumentFactory.php, line 42
Class
- SolrDocumentFactory
- Defines a class for a Solr Document factory.
Namespace
Drupal\search_api_solrCode
public function create(ItemInterface $item) {
$plugin = $this->typedDataManager
->getDefinition(static::$solrDocument)['class'];
return $plugin::createFromItem($item);
}