AvatarKitServiceBase.php in Avatar Kit 8.2
File
src/Plugin/Avatars/Service/AvatarKitServiceBase.php
View source
<?php
namespace Drupal\avatars\Plugin\Avatars\Service;
use dpi\ak\AvatarIdentifier;
use dpi\ak\AvatarIdentifierInterface;
use Drupal\Component\Plugin\PluginBase;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Form\FormStateInterface;
abstract class AvatarKitServiceBase extends PluginBase implements AvatarKitServiceInterface {
public function defaultConfiguration() : array {
return [];
}
public function getConfiguration() : array {
return $this->configuration;
}
public function setConfiguration(array $configuration) : void {
$this->configuration = NestedArray::mergeDeep($this
->defaultConfiguration(), $configuration);
}
public function calculateDependencies() : array {
return [];
}
public function buildConfigurationForm(array $form, FormStateInterface $form_state) : array {
return $form;
}
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) : void {
}
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) : void {
}
public function createIdentifier() : AvatarIdentifierInterface {
return new AvatarIdentifier();
}
}