function drupal_map_assoc

Forms an associative array from a linear array.

See also

\Drupal\Component\Utility\MapArray::copyValuesToKeys()

63 calls to drupal_map_assoc()
ActionBag::__construct in drupal/core/lib/Drupal/Core/Action/ActionBag.php
Constructs a new ActionBag object.
AggregatorCategoryBlock::blockForm in drupal/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php
Overrides \Drupal\block\BlockBase::blockForm().
AggregatorFeedBlock::blockForm in drupal/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
Overrides \Drupal\block\BlockBase::blockForm().
BlockPluginBag::__construct in drupal/core/modules/block/lib/Drupal/block/BlockPluginBag.php
Constructs a BlockPluginBag object.
CronForm::buildForm in drupal/core/modules/system/lib/Drupal/system/Form/CronForm.php
Implements \Drupal\Core\Form\FormInterface::buildForm().

... See full list

File

drupal/core/includes/common.inc, line 1556
Common functions that many Drupal modules will need to reference.

Code

function drupal_map_assoc($array, $callable = NULL) {
  return MapArray::copyValuesToKeys($array, $callable);
}