protected function GroupContentTypeForm::getRelationPlugin in Group 2.0.x
Returns the configurable plugin for the group content type.
Return value
\Drupal\group\Plugin\Group\Relation\GroupRelationInterface The configurable group relation plugin.
3 calls to GroupContentTypeForm::getRelationPlugin()
- GroupContentTypeForm::form in src/
Entity/ Form/ GroupContentTypeForm.php - Gets the actual form array to be built.
- GroupContentTypeForm::submitForm in src/
Entity/ Form/ GroupContentTypeForm.php - This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…
- GroupContentTypeForm::validateForm in src/
Entity/ Form/ GroupContentTypeForm.php - Form validation handler.
File
- src/
Entity/ Form/ GroupContentTypeForm.php, line 48
Class
- GroupContentTypeForm
- Form controller for group content type forms.
Namespace
Drupal\group\Entity\FormCode
protected function getRelationPlugin() {
/** @var \Drupal\group\Entity\GroupContentTypeInterface $group_content_type */
$group_content_type = $this
->getEntity();
$group_type = $group_content_type
->getGroupType();
// Initialize an empty plugin so we can show a default configuration form.
if ($this->operation == 'add') {
$plugin_id = $group_content_type
->getRelationPluginId();
$configuration['group_type_id'] = $group_type
->id();
return $this->pluginManager
->createInstance($plugin_id, $configuration);
}
else {
return $group_content_type
->getRelationPlugin();
}
}