You are here

public static function EntityShareUtility::isNumericArray in Entity Share 8.2

Same name and namespace in other branches
  1. 8.3 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.

2 calls to EntityShareUtility::isNumericArray()
BlockFieldBlockContentImporter::importBlockContentEntities in modules/entity_share_client/src/EventSubscriber/BlockFieldBlockContentImporter.php
Import block contents from block field.
EntityShareUtility::prepareData in src/EntityShareUtility.php
Uniformize JSON data in case of single value.

File

src/EntityShareUtility.php, line 39

Class

EntityShareUtility
Contains helper methods for Entity share.

Namespace

Drupal\entity_share

Code

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