ContentLanguageSettingsInterface.php 1.76 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
<?php

/**
 * @file
 * Contains \Drupal\language\ContentLanguageSettingsInterface.
 */

namespace Drupal\language;

use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\Core\Config\Entity\ThirdPartySettingsInterface;

/**
 * Provides an interface defining language settings for content entities.
 */
interface ContentLanguageSettingsInterface extends ConfigEntityInterface, ThirdPartySettingsInterface {

  /**
   * Gets the entity type ID this config applies to.
   *
   * @return string
   */
  public function getTargetEntityTypeId();

  /**
   * Gets the bundle this config applies to.
   *
   * @return string
   */
  public function getTargetBundle();

  /**
   * Sets the bundle this config applies to.
   *
   * @param string $target_bundle
   *   The bundle.
   *
   * @return $this
   */
  public function setTargetBundle($target_bundle);

  /**
   * Sets the default language code.
   *
   * @param string $default_langcode
   *   The default language code.
   *
   * @return $this;
   */
  public function setDefaultLangcode($default_langcode);

  /**
   * Gets the default language code.
   *
   * @return string
   */
  public function getDefaultLangcode();

  /**
   * Sets if the language must be alterable or not.
   *
   * @param bool $language_alterable
   *   Flag indicating if the language must be alterable.
   *
   * @return $this
   */
  public function setLanguageAlterable($language_alterable);

  /**
   * Checks if the language is alterable or not.
   *
   * @return bool
   */
  public function isLanguageAlterable();

  /**
   * Checks if this config object contains the default values in every property.
   *
   * @return bool
   *   True if all the properties contain the default values. False otherwise.
   */
  public function isDefaultConfiguration();

}