You are here

class CslMappingForm in Bibliography & Citation 2.0.x

Same name and namespace in other branches
  1. 8 modules/bibcite_entity/src/Form/CslMappingForm.php \Drupal\bibcite_entity\Form\CslMappingForm

Mapping form for CSL pseudo format.

Hierarchy

Expanded class hierarchy of CslMappingForm

1 string reference to 'CslMappingForm'
bibcite_entity.routing.yml in modules/bibcite_entity/bibcite_entity.routing.yml
modules/bibcite_entity/bibcite_entity.routing.yml

File

modules/bibcite_entity/src/Form/CslMappingForm.php, line 11

Namespace

Drupal\bibcite_entity\Form
View source
class CslMappingForm extends MappingForm {

  /**
   * {@inheritdoc}
   */
  public function buildForm(array $form, FormStateInterface $form_state, $bibcite_format = NULL) {
    $definition = [
      'id' => 'csl',
      'label' => $this
        ->t('CSL'),
      'types' => [
        'bill',
        'book',
        'chapter',
        'broadcast',
        'paper-conference',
        'motion_picture',
        'article-journal',
        'legal_case',
        'article-magazine',
        'manuscript',
        'map',
        'article-newspaper',
        'patent',
        'personal_communication',
        'report',
        'legislation',
        'thesis',
        'webpage',
        'article',
        'dataset',
        'entry',
        'entry-dictionary',
        'entry-encyclopedia',
        'figure',
        'graphic',
        'interview',
        'musical_score',
        'pamphlet',
        'post',
        'post-weblog',
        'review',
        'review-book',
        'song',
        'speech',
        'treaty',
      ],
      'fields' => [
        'title',
        'type',
        'keyword',
        'author',
        'abstract',
        'issued',
        'collection-title',
        'container-title',
        'volume',
        'edition',
        'version',
        'chapter-number',
        'section',
        'issue',
        'number-of-volumes',
        'number',
        'page',
        'container',
        'event-date',
        'original-date',
        'publisher',
        'event-place',
        'publisher-place',
        'ISSN',
        'ISBN',
        'call-number',
        'citation-label',
        'URL',
        'DOI',
        'note',
        'original-title',
        'accessed',
        'annote',
        'archive',
        'archive_location',
        'archive-place',
        'author',
        'authority',
        'citation-number',
        'collection-editor',
        'collection-number',
        'composer',
        'container-author',
        'container-title',
        'container-title-short',
        'dimensions',
        'director',
        'editor',
        'editorial-director',
        'first-reference-note-number',
        'genre',
        'illustrator',
        'interviewer',
        'jurisdiction',
        'locator',
        'medium',
        'number-of-pages',
        'original-author',
        'original-publisher',
        'original-publisher-place',
        'page-first',
        'PMCID',
        'PMID',
        'recipient',
        'references',
        'reviewed-author',
        'reviewed-title',
        'scale',
        'source',
        'status',
        'submitted',
        'title-short',
        'translator',
        'year-suffix',
      ],
      'provider' => 'bibcite_entity',
    ];
    $bibcite_format = new BibciteFormat([], 'csl', $definition);
    return parent::buildForm($form, $form_state, $bibcite_format);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CslMappingForm::buildForm public function Form constructor. Overrides MappingForm::buildForm
DependencySerializationTrait::$_entityStorages protected property
DependencySerializationTrait::$_serviceIds protected property
DependencySerializationTrait::__sleep public function 2
DependencySerializationTrait::__wakeup public function 2
FormBase::$configFactory protected property The config factory. 3
FormBase::$requestStack protected property The request stack. 1
FormBase::$routeMatch protected property The route match.
FormBase::config protected function Retrieves a configuration object.
FormBase::configFactory protected function Gets the config factory for this form. 3
FormBase::container private function Returns the service container.
FormBase::currentUser protected function Gets the current user.
FormBase::getRequest protected function Gets the request object.
FormBase::getRouteMatch protected function Gets the route match.
FormBase::logger protected function Gets the logger for a specific channel.
FormBase::redirect protected function Returns a redirect response object for the specified route.
FormBase::resetConfigFactory public function Resets the configuration factory.
FormBase::setConfigFactory public function Sets the config factory for this form.
FormBase::setRequestStack public function Sets the request stack object to use.
FormBase::validateForm public function Form validation handler. Overrides FormInterface::validateForm 72
LoggerChannelTrait::$loggerFactory protected property The logger channel factory service.
LoggerChannelTrait::getLogger protected function Gets the logger for a specific channel.
LoggerChannelTrait::setLoggerFactory public function Injects the logger channel factory.
MappingForm::$config protected property Configuration object.
MappingForm::$entityFieldManager protected property Entity field manager service.
MappingForm::$entityTypeManager protected property Entity type manager service.
MappingForm::create public static function Instantiates a new instance of this class. Overrides FormBase::create
MappingForm::formTitle public static function Mapping page title callback.
MappingForm::getFormId public function Returns a unique string identifying the form. Overrides FormInterface::getFormId
MappingForm::getReferenceFieldOptions protected function Get array of Reference field options.
MappingForm::getReferenceTypesOptions protected function Get array of Reference types options.
MappingForm::initConfiguration protected function Init mapping configuration object.
MappingForm::submitForm public function Form submission handler. Overrides FormInterface::submitForm
MappingForm::__construct public function Mapping form constructor.
MessengerTrait::$messenger protected property The messenger. 27
MessengerTrait::messenger public function Gets the messenger. 27
MessengerTrait::setMessenger public function Sets the messenger.
RedirectDestinationTrait::$redirectDestination protected property The redirect destination service. 1
RedirectDestinationTrait::getDestinationArray protected function Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url.
RedirectDestinationTrait::getRedirectDestination protected function Returns the redirect destination service.
RedirectDestinationTrait::setRedirectDestination public function Sets the redirect destination service.
StringTranslationTrait::$stringTranslation protected property The string translation service. 4
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.