You are here

public function RealisticDummyContentAttribute::getExtensions in Realistic Dummy Content 8.2

Same name and namespace in other branches
  1. 7.2 api/src/includes/RealisticDummyContentAttribute.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentAttribute::getExtensions()
  2. 3.x api/src/includes/RealisticDummyContentAttribute.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentAttribute::getExtensions()

Get acceptable file extensions which contain data for this attribute.

For example, title attributes can be replaced by data in txt files, whereas picture and field_image attributes require png, jpg, gif.

Return value

array An array of acceptable file extensions.

2 calls to RealisticDummyContentAttribute::getExtensions()
RealisticDummyContentAttribute::getCandidateFiles in api/src/includes/RealisticDummyContentAttribute.php
Get all candidate files for a given field for this entity.
RealisticDummyContentAttribute::valueFromFile in api/src/includes/RealisticDummyContentAttribute.php
Given a RealisticDummyContentFileGroup object, get structured property.
2 methods override RealisticDummyContentAttribute::getExtensions()
RealisticDummyContentImageField::getExtensions in api/src/includes/RealisticDummyContentImageField.php
Get acceptable file extensions which contain data for this attribute.
RealisticDummyContentUserPicture::getExtensions in api/src/includes/RealisticDummyContentUserPicture.php
Get acceptable file extensions which contain data for this attribute.

File

api/src/includes/RealisticDummyContentAttribute.php, line 168

Class

RealisticDummyContentAttribute
Represents either a field or a property for an entity.

Namespace

Drupal\realistic_dummy_content_api\includes

Code

public function getExtensions() {

  // By default, use only text files. Other manipulators, say, for image
  // fields or file fields, can specify other extension types.
  return array(
    'txt',
  );
}