Loading src/Element/EntityAutocompleteTagify.php +0 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\tagify\Element; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element\Textfield; use Drupal\Core\Url; Loading src/Plugin/Field/FieldWidget/TagifyEntityReferenceAutocompleteWidget.php +10 −11 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\Core\KeyValueStore\KeyValueFactoryInterface; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Site\Settings; use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; /** Loading Loading @@ -181,9 +180,9 @@ class TagifyEntityReferenceAutocompleteWidget extends WidgetBase { } // User field definition doesn't have fieldStorage defined. $cardinality = $target_type != 'user' ? $items->getFieldDefinition()->get('fieldStorage')->get('cardinality') : ''; $limited = $cardinality === 1 ? 'limited' : ''; // $cardinality = $target_type != 'user' // ?$items->getFieldDefinition()->get('fieldStorage')->get('cardinality'):''; // $limited = $cardinality === 1 ? 'limited' : '' . $element += [ '#type' => 'entity_autocomplete_tagify', '#default_value' => $default_value, Loading src/TagifyEntityAutocompleteMatcher.php +4 −5 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ namespace Drupal\tagify; use Drupal\Component\Utility\Html; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManagerInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; Loading Loading @@ -51,7 +50,7 @@ class TagifyEntityAutocompleteMatcher implements TagifyEntityAutocompleteMatcher } /** * {@inheridoc} * {@inheritdoc} */ public function getMatches($target_type, $selection_handler, array $selection_settings, $string = '', array $selected = []) { $matches = []; Loading tagify.routing.yml +1 −0 Original line number Diff line number Diff line Loading @@ -3,4 +3,5 @@ tagify.entity_autocomplete: defaults: _controller: '\Drupal\tagify\Controller\TagifyEntityAutocompleteController::handleAutocomplete' requirements: # Every user have access to the route. _access: 'TRUE' Loading
src/Element/EntityAutocompleteTagify.php +0 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\tagify\Element; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element\Textfield; use Drupal\Core\Url; Loading
src/Plugin/Field/FieldWidget/TagifyEntityReferenceAutocompleteWidget.php +10 −11 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\Core\KeyValueStore\KeyValueFactoryInterface; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Site\Settings; use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; /** Loading Loading @@ -181,9 +180,9 @@ class TagifyEntityReferenceAutocompleteWidget extends WidgetBase { } // User field definition doesn't have fieldStorage defined. $cardinality = $target_type != 'user' ? $items->getFieldDefinition()->get('fieldStorage')->get('cardinality') : ''; $limited = $cardinality === 1 ? 'limited' : ''; // $cardinality = $target_type != 'user' // ?$items->getFieldDefinition()->get('fieldStorage')->get('cardinality'):''; // $limited = $cardinality === 1 ? 'limited' : '' . $element += [ '#type' => 'entity_autocomplete_tagify', '#default_value' => $default_value, Loading
src/TagifyEntityAutocompleteMatcher.php +4 −5 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ namespace Drupal\tagify; use Drupal\Component\Utility\Html; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManagerInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; Loading Loading @@ -51,7 +50,7 @@ class TagifyEntityAutocompleteMatcher implements TagifyEntityAutocompleteMatcher } /** * {@inheridoc} * {@inheritdoc} */ public function getMatches($target_type, $selection_handler, array $selection_settings, $string = '', array $selected = []) { $matches = []; Loading
tagify.routing.yml +1 −0 Original line number Diff line number Diff line Loading @@ -3,4 +3,5 @@ tagify.entity_autocomplete: defaults: _controller: '\Drupal\tagify\Controller\TagifyEntityAutocompleteController::handleAutocomplete' requirements: # Every user have access to the route. _access: 'TRUE'