Tripal
|
Public Member Functions | |
__construct (array $configuration, $plugin_id, $plugin_definition, TripalLogger $logger) | |
![]() | |
getStoredTypes () | |
getStoredValues () | |
insertValues (&$values) | |
updateValues (&$values) | |
loadValues (&$values) | |
deleteValues ($values) | |
findValues ($values) | |
validateValues ($values) | |
Static Public Member Functions | |
static | create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) |
Protected Attributes | |
$logger | |
$field_definitions = [] | |
$property_types = [] | |
addFieldDefinition (string $field_name, object $field_definition) | |
getFieldDefinition (string $field_name) | |
addTypes (string $field_name, array $types) | |
getTypes () | |
getPropertyType (string $field_name, string $key) | |
removeTypes (string $field_name, array $types) | |
publishForm ($form, FormStateInterface &$form_state) | |
publishFormValidate ($form, FormStateInterface &$form_state) | |
publishFromSubmit ($form, FormStateInterface &$form_state) | |
cloneValues ($values) | |
addEmptyValuesItem (&$values, $field_name) | |
Drupal\tripal\TripalStorage\TripalStorageBase::__construct | ( | array | $configuration, |
$plugin_id, | |||
$plugin_definition, | |||
TripalLogger | $logger | ||
) |
Implements __contruct().
Since we have implemented the ContainerFactoryPluginInterface, the constructor will be passed additional parameters added by the create() function. This allows our plugin to use dependency injection without our plugin manager service needing to worry about it.
array | $configuration | |
string | $plugin_id | |
mixed | $plugin_definition | |
\Drupal\tripal\Services\TripalLogger | $logger |
|
protected |
A helper function to add a new item for a field by cloning delta 0.
array | $values | An array of property values. |
string | $field_name | The name of the field to addd an item to. |
Drupal\tripal\TripalStorage\TripalStorageBase::addFieldDefinition | ( | string | $field_name, |
object | $field_definition | ||
) |
inheritdoc}
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Reimplemented in Drupal\tripal_chado\Plugin\TripalStorage\ChadoStorage.
Drupal\tripal\TripalStorage\TripalStorageBase::addTypes | ( | string | $field_name, |
array | $types | ||
) |
inheritdoc}
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Reimplemented in Drupal\tripal\Plugin\TripalStorage\DrupalSqlStorage.
|
protected |
A helper function to clone a values array.
array | $values | An array of property values. |
|
static |
Implements ContainerFactoryPluginInterface->create().
Since we have implemented the ContainerFactoryPluginInterface this static function will be called behind the scenes when a Plugin Manager uses createInstance(). Specifically this method is used to determine the parameters to pass to the contructor.
\Symfony\Component\DependencyInjection\ContainerInterface | $container | |
array | $configuration | |
string | $plugin_id | |
mixed | $plugin_definition |
Reimplemented in Drupal\tripal_chado\Plugin\TripalStorage\ChadoStorage.
Drupal\tripal\TripalStorage\TripalStorageBase::getFieldDefinition | ( | string | $field_name | ) |
inheritdoc}
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\TripalStorage\TripalStorageBase::getPropertyType | ( | string | $field_name, |
string | $key | ||
) |
inheritdoc}
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\TripalStorage\TripalStorageBase::getTypes | ( | ) |
inheritdoc}
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\TripalStorage\TripalStorageBase::publishForm | ( | $form, | |
FormStateInterface & | $form_state | ||
) |
Provides form elements to be added to the Tripal entity publish form.
array | $form | The form array definition. |
\Drupal\Core\Form\FormStateInterface | $form_state | The form state object. |
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Reimplemented in Drupal\tripal_chado\Plugin\TripalStorage\ChadoStorage.
Drupal\tripal\TripalStorage\TripalStorageBase::publishFormValidate | ( | $form, | |
FormStateInterface & | $form_state | ||
) |
Handles validation of the publish form elements.
array | $form | The form array definition. |
\Drupal\Core\Form\FormStateInterface | $form_state | The form state object. |
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\TripalStorage\TripalStorageBase::publishFromSubmit | ( | $form, | |
FormStateInterface & | $form_state | ||
) |
Handles submission of the form elements for the storage backend.
array | $form | The form array definition. |
\Drupal\Core\Form\FormStateInterface | $form_state | The form state object. |
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.
Drupal\tripal\TripalStorage\TripalStorageBase::removeTypes | ( | string | $field_name, |
array | $types | ||
) |
inheritdoc}
Implements Drupal\tripal\TripalStorage\Interfaces\TripalStorageInterface.