You are here

public static function Bundle::loadByMachineName in Entity Construction Kit (ECK) 7.3

Same name and namespace in other branches
  1. 7.2 eck.classes.inc \Bundle::loadByMachineName()

This method returns a bundle object.

Parameters

string $machine_name: A string composed of the entity type name and the bundle name. "{$entity_type_name}_{$bundle_name}"

Return value

mixed Bundle object or Null.

6 calls to Bundle::loadByMachineName()
Bundle::save in ./eck.classes.inc
Save the entity type.
bundle_load in ./eck.module
Bundle load.
eck_bundle_features_export in ./eck.features.inc
Implements hook_features_export().
eck_bundle_features_export_render in ./eck.features.inc
Implements hook_features_export_render().
eck_bundle_features_rebuild in ./eck.features.inc
Implements hook_features_rebuild().

... See full list

File

./eck.classes.inc, line 620
Classes for all the different objects used in ECK.

Class

Bundle

Code

public static function loadByMachineName($machine_name) {
  $bundles = Bundle::loadAll();
  if (array_key_exists($machine_name, $bundles)) {
    return $bundles[$machine_name];
  }
  return NULL;
}