class MappingStepService in GatherContent 8.4
Same name and namespace in other branches
- 8.5 gathercontent_ui/src/Form/MappingEditSteps/MappingStepService.php \Drupal\gathercontent_ui\Form\MappingEditSteps\MappingStepService
Class MappingStepFactory.
@package Drupal\gathercontent_ui\Form\MappingEditSteps
Hierarchy
- class \Drupal\gathercontent_ui\Form\MappingEditSteps\MappingStepService
Expanded class hierarchy of MappingStepService
1 file declares its use of MappingStepService
- MappingEditForm.php in gathercontent_ui/
src/ Form/ MappingEditForm.php
1 string reference to 'MappingStepService'
- gathercontent_ui.services.yml in gathercontent_ui/
gathercontent_ui.services.yml - gathercontent_ui/gathercontent_ui.services.yml
1 service uses MappingStepService
File
- gathercontent_ui/
src/ Form/ MappingEditSteps/ MappingStepService.php, line 13
Namespace
Drupal\gathercontent_ui\Form\MappingEditStepsView source
class MappingStepService {
protected $newStep;
protected $editStep;
protected $entityReferenceStep;
/**
* Returns new step object.
*
* @param \Drupal\gathercontent\Entity\MappingInterface $mapping
* Mapping object.
* @param \Cheppers\GatherContent\DataTypes\Template $template
* Template object.
*
* @return \Drupal\gathercontent_ui\Form\MappingEditSteps\MappingStepNew
* MappingStepNew object.
*/
public function getNewStep(MappingInterface $mapping, Template $template) {
if ($this->newStep === NULL) {
$this->newStep = new MappingStepNew($mapping, $template);
}
return $this->newStep;
}
/**
* Returns new step object.
*
* @param \Drupal\gathercontent\Entity\MappingInterface $mapping
* Mapping object.
* @param \Cheppers\GatherContent\DataTypes\Template $template
* Template object.
*
* @return \Drupal\gathercontent_ui\Form\MappingEditSteps\MappingStepEdit
* MappingStepEdit object.
*/
public function getEditStep(MappingInterface $mapping, Template $template) {
if ($this->editStep === NULL) {
$this->editStep = new MappingStepEdit($mapping, $template);
}
return $this->editStep;
}
/**
* Returns new step object.
*
* @param \Drupal\gathercontent\Entity\MappingInterface $mapping
* Mapping object.
* @param \Cheppers\GatherContent\DataTypes\Template $template
* Template object.
*
* @return \Drupal\gathercontent_ui\Form\MappingEditSteps\MappingStepEntityReference
* MappingStepEntityReference object.
*/
public function getEntityReferenceStep(MappingInterface $mapping, Template $template) {
if ($this->entityReferenceStep === NULL) {
$this->entityReferenceStep = new MappingStepEntityReference($mapping, $template);
}
if ($this->newStep !== NULL) {
$this->entityReferenceStep
->setEntityReferenceFields($this->newStep
->getEntityReferenceFields());
$this->entityReferenceStep
->setEntityReferenceFieldsOptions($this->newStep
->getEntityReferenceFieldsOptions());
}
if ($this->editStep !== NULL) {
$this->entityReferenceStep
->setEntityReferenceFields($this->editStep
->getEntityReferenceFields());
$this->entityReferenceStep
->setEntityReferenceFieldsOptions($this->editStep
->getEntityReferenceFieldsOptions());
}
return $this->entityReferenceStep;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MappingStepService:: |
protected | property | ||
MappingStepService:: |
protected | property | ||
MappingStepService:: |
protected | property | ||
MappingStepService:: |
public | function | Returns new step object. | |
MappingStepService:: |
public | function | Returns new step object. | |
MappingStepService:: |
public | function | Returns new step object. |