You are here

function entityform_type_load in Entityform 7.2

Same name and namespace in other branches
  1. 7 entityform.module \entityform_type_load()

Menu argument loader; Load a entityform type by string.

Parameters

$type_name: The machine-readable name of a entityform type to load.

Return value

A entityform_type entity or FALSE if $type does not exist.

16 calls to entityform_type_load()
Entityform::defaultLabel in ./entityform.module
Defines the entity label if the 'entity_class_label' callback is used.
Entityform::getTypeName in ./entityform.module
EntityformCRUDTestCase::updateEntityformType in ./entityform.test
EntityformTestCase::entityformSubmit in ./entityform.test
EntityformUIController::confirm_path in ./entityform.admin.inc

... See full list

1 string reference to 'entityform_type_load'
entityform_type_form in ./entityform_type.admin.inc
Generates the entityform type editing form.

File

./entityform.module, line 509
Module for the Entityform Entity - a starting point to create your own Entity and associated administration interface

Code

function entityform_type_load($type_name) {
  $type_name = str_replace('-', '_', $type_name);
  $entityform_type = entityform_get_types($type_name);
  return isset($entityform_type) ? $entityform_type : FALSE;
}