You are here

function Attribute::GetExtensions in Realistic Dummy Content 8

Get acceptable file extensions which contain data for this attribute.

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

Return value

An array of acceptable file extensions.

2 calls to Attribute::GetExtensions()
Attribute::GetCandidateFiles in api/src/attributes/Attribute.php
Get all candidate files for a given field for this entity.
Attribute::ValueFromFile in api/src/attributes/Attribute.php
Given a FileGroup object, get structured property if extentions ok.
2 methods override Attribute::GetExtensions()
ImageField::GetExtensions in api/src/attributes/ImageField.php
Get acceptable file extensions which contain data for this attribute.
UserPicture::GetExtensions in api/src/attributes/UserPicture.php
Get acceptable file extensions which contain data for this attribute.

File

api/src/attributes/Attribute.php, line 171
Define autoload class.

Class

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

Namespace

Drupal\realistic_dummy_content_api\attributes

Code

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',
  );
}