Skip to content
Snippets Groups Projects
Commit 68a6cb54 authored by Johan Gant's avatar Johan Gant Committed by Matt Lucasiewicz
Browse files

Issue #3205634 by johan.gant, lahoosascoots: Plugin to cover taxonomy term entities

parent 791712e2
Branches 8.x-1.x
Tags 8.x-1.3
No related merge requests found
<?php
namespace Drupal\entity_reference_unpublished\Plugin\EntityReferenceSelection;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection;
/**
* Unpublished taxonomy term plugin of the Entity Reference Selection plugin.
*
* @see \Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManager
* @see \Drupal\Core\Entity\Annotation\EntityReferenceSelection
* @see \Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface
* @see \Drupal\Core\Entity\Plugin\Derivative\DefaultSelectionDeriver
* @see plugin_api
*
* @EntityReferenceSelection(
* id = "unpublished_taxonomy_term",
* label = @Translation("Unpublished Taxonomy term"),
* entity_types = {"taxonomy_term"},
* group = "unpublished_taxonomy_term",
* weight = 0,
* )
*/
class UnpublishedTaxonomyTermSelection extends DefaultSelection {
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = parent::buildConfigurationForm($form, $form_state);
$form['target_bundles']['#title'] = $this->t('Vocabularies');
return $form;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment