function ShortcutTestCase::getShortcutInformation

Extracts information from shortcut set links.

Parameters

object $set: The shortcut set object to extract information from.

string $key: The array key indicating what information to extract from each link:

  • 'link_path': Extract link paths.
  • 'link_title': Extract link titles.
  • 'mlid': Extract the menu link item ID numbers.

Return value

array Array of the requested information from each link.

10 calls to ShortcutTestCase::getShortcutInformation()
ShortcutLinksTestCase::testShortcutLinkAdd in drupal-7.x/modules/shortcut/shortcut.test
Tests that creating a shortcut works properly.
ShortcutLinksTestCase::testShortcutLinkAdd in drupal-7.x/modules/shortcut/shortcut.test
Tests that creating a shortcut works properly.
ShortcutLinksTestCase::testShortcutLinkChangePath in drupal-7.x/modules/shortcut/shortcut.test
Tests that changing the path of a shortcut link works.
ShortcutLinksTestCase::testShortcutLinkChangePath in drupal-7.x/modules/shortcut/shortcut.test
Tests that changing the path of a shortcut link works.
ShortcutLinksTestCase::testShortcutLinkDelete in drupal-7.x/modules/shortcut/shortcut.test
Tests deleting a shortcut link.

... See full list

Archivo

drupal-7.x/modules/shortcut/shortcut.test, line 90
Tests for shortcut.module.

Class

ShortcutTestCase
Defines base class for shortcut test cases.

Código

function getShortcutInformation($set, $key) {
  $info = array();
  foreach ($set->links as $link) {
    $info[] = $link[$key];
  }
  return $info;
}