5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
8 * Provides an interface defining a crop type entity.
10 interface CropTypeInterface extends ConfigEntityInterface {
13 * Aspect ratio validation regexp.
17 const VALIDATION_REGEXP = '#^[0-9]+:[0-9]+$#';
20 * Get aspect ratio of this crop type.
23 * The aspect ratio of this crop type.
25 public function getAspectRatio();
28 * Returns a list of available crop type names.
30 * This list can include types that are queued for addition or deletion.
33 * An array of crop type labels, keyed by the crop type name.
35 public static function getCropTypeNames();
38 * Validates the currently set values.
40 * @return \Symfony\Component\Validator\ConstraintViolationListInterface
41 * A list of constraint violations. If the list is empty, validation
44 public function validate();
47 * Returns width and height soft limit values.
50 * Width and height values.
52 public function getSoftLimit();
55 * Returns width and height hard limit values.
58 * Width and height values.
60 public function getHardLimit();