You are here

public static function EntityShareUtility::isNumericArray in Entity Share 8.3

Same name and namespace in other branches
  1. 8.2 src/EntityShareUtility.php \Drupal\entity_share\EntityShareUtility::isNumericArray()

Check if a array is numeric.

Parameters

array $array: The array to check.

Return value

bool TRUE if the array is numeric. FALSE in case of associative array.

4 calls to EntityShareUtility::isNumericArray()
BlockFieldBlockContentImporter::prepareImportableEntityData in modules/entity_share_client/src/Plugin/EntityShareClient/Processor/BlockFieldBlockContentImporter.php
Method called on STAGE_PREPARE_IMPORTABLE_ENTITY_DATA.
EmbeddedEntityImporter::prepareImportableEntityData in modules/entity_share_client/src/Plugin/EntityShareClient/Processor/EmbeddedEntityImporter.php
Method called on STAGE_PREPARE_IMPORTABLE_ENTITY_DATA.
EntityShareUtility::prepareData in src/EntityShareUtility.php
Uniformize JSON data in case of single value.
LinkInternalContentImporter::prepareImportableEntityData in modules/entity_share_client/src/Plugin/EntityShareClient/Processor/LinkInternalContentImporter.php
Method called on STAGE_PREPARE_IMPORTABLE_ENTITY_DATA.

File

src/EntityShareUtility.php, line 41

Class

EntityShareUtility
Contains helper methods for Entity Share.

Namespace

Drupal\entity_share

Code

public static function isNumericArray(array $array) {
  foreach (array_keys($array) as $a) {
    if (!is_int($a)) {
      return FALSE;
    }
  }
  return TRUE;
}