You are here

public function RealisticDummyContentAttribute::getCandidateFiles in Realistic Dummy Content 7.2

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

Get all candidate files for a given field for this entity.

1 call to RealisticDummyContentAttribute::getCandidateFiles()
RealisticDummyContentAttribute::change in api/src/includes/RealisticDummyContentAttribute.php
Changes this attribute by looking for data in files.

File

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

Class

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

Namespace

Drupal\realistic_dummy_content_api\includes

Code

public function getCandidateFiles() {
  $files = array();
  foreach (Framework::instance()
    ->moduleList() as $module) {
    $filepath = DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . '/realistic_dummy_content/fields/' . $this
      ->getEntityType() . '/' . $this
      ->getBundle() . '/' . $this
      ->getName();
    $files = array_merge($files, RealisticDummyContentEnvironment::getAllFileGroups($filepath, $this
      ->getExtensions()));
  }
  return $files;
}