You are here

interface WebformContentCreatorInterface in Webform Content Creator 2.x

Same name and namespace in other branches
  1. 8 src/WebformContentCreatorInterface.php \Drupal\webform_content_creator\WebformContentCreatorInterface
  2. 3.x src/WebformContentCreatorInterface.php \Drupal\webform_content_creator\WebformContentCreatorInterface

Provides an interface defining an Webform content creator entity.

Hierarchy

Expanded class hierarchy of WebformContentCreatorInterface

All classes that implement WebformContentCreatorInterface

1 file declares its use of WebformContentCreatorInterface
WebformContentCreatorEntity.php in src/Entity/WebformContentCreatorEntity.php

File

src/WebformContentCreatorInterface.php, line 11

Namespace

Drupal\webform_content_creator
View source
interface WebformContentCreatorInterface extends ConfigEntityInterface {
  const WEBFORM = 'webform';
  const WEBFORM_CONTENT_CREATOR = 'webform_content_creator';
  const FIELD_TITLE = 'field_title';
  const WEBFORM_FIELD = 'webform_field';
  const CUSTOM_CHECK = 'custom_check';
  const CUSTOM_VALUE = 'custom_value';
  const ELEMENTS = 'elements';
  const TYPE = 'type';
  const SYNC_CONTENT = 'sync_content';
  const SYNC_CONTENT_DELETE = 'sync_content_delete';
  const SYNC_CONTENT_FIELD = 'sync_content_field';
  const USE_ENCRYPT = 'use_encrypt';
  const ENCRYPTION_PROFILE = 'encryption_profile';

  /**
   * Returns the entity title.
   *
   * @return string
   *   The entity title.
   */
  public function getTitle();

  /**
   * Sets the entity title.
   *
   * @param string $title
   *   Content title.
   *
   * @return $this
   *   The Webform Content Creator entity.
   */
  public function setTitle($title);

  /**
   * Returns the target entity type id.
   *
   * @return string
   *   The target entity type id.
   */
  public function getEntityTypeValue();

  /**
   * Sets the target entity type id.
   *
   * @param string $entityType
   *   Target entity type id.
   *
   * @return $this
   *   The Webform Content Creator entity.
   */
  public function setEntityTypeValue($entityType);

  /**
   * Returns the target bundle id.
   *
   * @return string
   *   The target bundle id.
   */
  public function getBundleValue();

  /**
   * Sets the target bundle id.
   *
   * @param string $bundle
   *   Target bundle id.
   *
   * @return $this
   *   The Webform Content Creator entity.
   */
  public function setBundleValue($bundle);

  /**
   * Returns the entity webform id.
   *
   * @return string
   *   The entity webform.
   */
  public function getWebform();

  /**
   * Sets the entity webform id.
   *
   * @param string $webform
   *   Webform id.
   *
   * @return $this
   *   The Webform Content Creator entity.
   */
  public function setWebform($webform);

  /**
   * Returns the entity attributes as an associative array.
   *
   * @return array
   *   The entity attributes mapping.
   */
  public function getAttributes();

  /**
   * Check if synchronization between content entities and webform submissions is used.
   *
   * @return bool
   *   true, when the synchronization is used. Otherwise, returns false.
   */
  public function getSyncEditContentCheck();

  /**
   * Check if synchronization is used in deletion.
   *
   * @return bool
   *   true, when the synchronization is used. Otherwise, returns false.
   */
  public function getSyncDeleteContentCheck();

  /**
   * Get content field in which the webform submission id will be stored.
   *
   * @return string
   *   Field machine name.
   */
  public function getSyncContentField();

  /**
   * Returns the encryption method.
   *
   * @return bool
   *   true, when an encryption profile is used. Otherwise, returns false.
   */
  public function getEncryptionCheck();

  /**
   * Returns the encryption profile.
   *
   * @return string
   *   The encryption profile name.
   */
  public function getEncryptionProfile();

  /**
   * Check if the target entity type exists.
   *
   * @return bool
   *   True, if the target entity type exists. Otherwise, returns false.
   */
  public function existsEntityType();

  /**
   * Check if the target bundle exists.
   *
   * @return bool
   *   True, if the target bundle exists. Otherwise, returns false.
   */
  public function existsBundle();

  /**
   * Check if the target entity type id is equal to the configured entity type.
   *
   * @param string $e
   *   Target entity type id.
   *
   * @return bool
   *   True, if the parameter is equal to the target entity type id of Webform
   *   content creator entity. Otherwise, returns false.
   */
  public function equalsEntityType($e);

  /**
   * Check if the target bundle id is equal to the configured bundle.
   *
   * @param string $bundle
   *   Target bundle id.
   *
   * @return bool
   *   True, if the parameter is equal to the target bundle id of Webform
   *   content creator entity. Otherwise, returns false.
   */
  public function equalsBundle($bundle);

  /**
   * Check if the webform id is equal to the configured webform id.
   *
   * @param string $webform
   *   Webform id.
   *
   * @return bool
   *   True, if the parameter is equal to the webform id of Webform
   *   content creator entity. Otherwise, returns false.
   */
  public function equalsWebform($webform);

  /**
   * Show a message accordingly to status, after creating/updating an entity.
   *
   * @param int $status
   *   Status int, returned after creating/updating an entity.
   */
  public function statusMessage($status);

  /**
   * Create content from webform submission.
   *
   * @param \Drupal\webform\WebformSubmissionInterface $webform_submission
   *   Webform submission.
   */
  public function createContent(WebformSubmissionInterface $webform_submission);

  /**
   * Update content from webform submission.
   *
   * @param \Drupal\webform\WebformSubmissionInterface $webform_submission
   *   Webform submission.
   * @param string $op
   *   Operation.
   *
   * @return bool
   *   True, if succeeded. Otherwise, return false.
   */
  public function updateContent(WebformSubmissionInterface $webform_submission, $op);

  /**
   * Check if field maximum size is exceeded.
   *
   * @param array $fields
   *   Content type fields.
   * @param string $k
   *   Field machine name.
   * @param string $decValue
   *   Decrypted value.
   *
   * @return int
   *   1 if maximum size is exceeded, otherwise return 0.
   */
  public function checkMaxFieldSizeExceeded(array $fields, $k, $decValue);

}

Members

Namesort descending Modifiers Type Description Overrides
AccessibleInterface::access public function Checks data value access. 9
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. 34
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. 34
CacheableDependencyInterface::getCacheTags public function The cache tags associated with this object. 27
ConfigEntityInterface::calculateDependencies public function Calculates dependencies and stores them in the dependency property. 2
ConfigEntityInterface::disable public function Disables the configuration entity. 2
ConfigEntityInterface::enable public function Enables the configuration entity. 2
ConfigEntityInterface::get public function Returns the value of a property. 2
ConfigEntityInterface::getDependencies public function Gets the configuration dependencies. 2
ConfigEntityInterface::hasTrustedData public function Gets whether on not the data is trusted. 2
ConfigEntityInterface::isInstallable public function Checks whether this entity is installable. 2
ConfigEntityInterface::isUninstalling public function Returns whether this entity is being changed during the uninstall process. 2
ConfigEntityInterface::onDependencyRemoval public function Informs the entity that entities it depends on will be deleted. 2
ConfigEntityInterface::set public function Sets the value of a property. 2
ConfigEntityInterface::setStatus public function Sets the status of the configuration entity. 2
ConfigEntityInterface::status public function Returns whether the configuration entity is enabled. 2
ConfigEntityInterface::trustData public function Sets that the data should be trusted. 2
EntityInterface::bundle public function Gets the bundle of the entity. 2
EntityInterface::create public static function Constructs a new entity object, without permanently saving it. 2
EntityInterface::createDuplicate public function Creates a duplicate of the entity. 2
EntityInterface::delete public function Deletes an entity permanently. 2
EntityInterface::enforceIsNew public function Enforces an entity to be new. 2
EntityInterface::getCacheTagsToInvalidate public function Returns the cache tags that should be used to invalidate caches. 2
EntityInterface::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies. 2
EntityInterface::getConfigDependencyName public function Gets the configuration dependency name. 2
EntityInterface::getConfigTarget public function Gets the configuration target identifier for the entity. 2
EntityInterface::getEntityType public function Gets the entity type definition. 2
EntityInterface::getEntityTypeId public function Gets the ID of the type of the entity. 2
EntityInterface::getOriginalId public function Gets the original ID. 2
EntityInterface::getTypedData public function Gets a typed data object for this entity object. 2
EntityInterface::hasLinkTemplate public function Indicates if a link template exists for a given key. 2
EntityInterface::id public function Gets the identifier. 2
EntityInterface::isNew public function Determines whether the entity is new. 2
EntityInterface::label public function Gets the label of the entity. 2
EntityInterface::language public function Gets the language of the entity. 2
EntityInterface::load public static function Loads an entity. 2
EntityInterface::loadMultiple public static function Loads one or more entities. 2
EntityInterface::postCreate public function Acts on a created entity before hooks are invoked. 2
EntityInterface::postDelete public static function Acts on deleted entities before the delete hook is invoked. 2
EntityInterface::postLoad public static function Acts on loaded entities. 3
EntityInterface::postSave public function Acts on a saved entity before the insert or update hook is invoked. 2
EntityInterface::preCreate public static function Changes the values of an entity before it is created. 2
EntityInterface::preDelete public static function Acts on entities before they are deleted and before hooks are invoked. 2
EntityInterface::preSave public function Acts on an entity before the presave hook is invoked. 2
EntityInterface::referencedEntities public function Gets a list of entities referenced by this entity. 2
EntityInterface::save public function Saves an entity permanently. 2
EntityInterface::setOriginalId public function Sets the original ID. 2
EntityInterface::toArray public function Gets an array of all property values. 3
EntityInterface::toLink public function Generates the HTML for a link to this entity. 2
EntityInterface::toUrl public function Gets the URL object for the entity. 2
EntityInterface::uriRelationships public function Gets a list of URI relationships supported by this entity. 2
EntityInterface::uuid public function Gets the entity UUID (Universally Unique Identifier). 2
RefinableCacheableDependencyInterface::addCacheableDependency public function Adds a dependency on an object: merges its cacheability metadata. 1
RefinableCacheableDependencyInterface::addCacheContexts public function Adds cache contexts. 1
RefinableCacheableDependencyInterface::addCacheTags public function Adds cache tags. 1
RefinableCacheableDependencyInterface::mergeCacheMaxAge public function Merges the maximum age (in seconds) with the existing maximum age. 1
SynchronizableInterface::isSyncing public function Returns whether this entity is being changed as part of a synchronization. 1
SynchronizableInterface::setSyncing public function Sets the status of the synchronization flag. 1
ThirdPartySettingsInterface::getThirdPartyProviders public function Gets the list of third parties that store information. 5
ThirdPartySettingsInterface::getThirdPartySetting public function Gets the value of a third-party setting. 5
ThirdPartySettingsInterface::getThirdPartySettings public function Gets all third-party settings of a given module. 5
ThirdPartySettingsInterface::setThirdPartySetting public function Sets the value of a third-party setting. 5
ThirdPartySettingsInterface::unsetThirdPartySetting public function Unsets a third-party setting. 5
WebformContentCreatorInterface::checkMaxFieldSizeExceeded public function Check if field maximum size is exceeded. 1
WebformContentCreatorInterface::createContent public function Create content from webform submission. 1
WebformContentCreatorInterface::CUSTOM_CHECK constant
WebformContentCreatorInterface::CUSTOM_VALUE constant
WebformContentCreatorInterface::ELEMENTS constant
WebformContentCreatorInterface::ENCRYPTION_PROFILE constant
WebformContentCreatorInterface::equalsBundle public function Check if the target bundle id is equal to the configured bundle. 1
WebformContentCreatorInterface::equalsEntityType public function Check if the target entity type id is equal to the configured entity type. 1
WebformContentCreatorInterface::equalsWebform public function Check if the webform id is equal to the configured webform id. 1
WebformContentCreatorInterface::existsBundle public function Check if the target bundle exists. 1
WebformContentCreatorInterface::existsEntityType public function Check if the target entity type exists. 1
WebformContentCreatorInterface::FIELD_TITLE constant
WebformContentCreatorInterface::getAttributes public function Returns the entity attributes as an associative array. 1
WebformContentCreatorInterface::getBundleValue public function Returns the target bundle id. 1
WebformContentCreatorInterface::getEncryptionCheck public function Returns the encryption method. 1
WebformContentCreatorInterface::getEncryptionProfile public function Returns the encryption profile. 1
WebformContentCreatorInterface::getEntityTypeValue public function Returns the target entity type id. 1
WebformContentCreatorInterface::getSyncContentField public function Get content field in which the webform submission id will be stored. 1
WebformContentCreatorInterface::getSyncDeleteContentCheck public function Check if synchronization is used in deletion. 1
WebformContentCreatorInterface::getSyncEditContentCheck public function Check if synchronization between content entities and webform submissions is used. 1
WebformContentCreatorInterface::getTitle public function Returns the entity title. 1
WebformContentCreatorInterface::getWebform public function Returns the entity webform id. 1
WebformContentCreatorInterface::setBundleValue public function Sets the target bundle id. 1
WebformContentCreatorInterface::setEntityTypeValue public function Sets the target entity type id. 1
WebformContentCreatorInterface::setTitle public function Sets the entity title. 1
WebformContentCreatorInterface::setWebform public function Sets the entity webform id. 1
WebformContentCreatorInterface::statusMessage public function Show a message accordingly to status, after creating/updating an entity. 1
WebformContentCreatorInterface::SYNC_CONTENT constant
WebformContentCreatorInterface::SYNC_CONTENT_DELETE constant
WebformContentCreatorInterface::SYNC_CONTENT_FIELD constant
WebformContentCreatorInterface::TYPE constant
WebformContentCreatorInterface::updateContent public function Update content from webform submission. 1
WebformContentCreatorInterface::USE_ENCRYPT constant
WebformContentCreatorInterface::WEBFORM constant
WebformContentCreatorInterface::WEBFORM_CONTENT_CREATOR constant
WebformContentCreatorInterface::WEBFORM_FIELD constant