public function EntityformTypeController::load in Entityform 7.2
Same name and namespace in other branches
- 7 entityform.module \EntityformTypeController::load()
Overridden to load paths also
Overrides EntityAPIControllerExportable::load
1 call to EntityformTypeController::load()
- EntityformTypeController::delete in ./
entityform.module - Overridden to delete aliases and clear cache.
File
- ./
entityform.module, line 1435 - Module for the Entityform Entity - a starting point to create your own Entity and associated administration interface
Class
- EntityformTypeController
- The Controller for Entityform entities
Code
public function load($ids = array(), $conditions = array()) {
$entityform_types = parent::load($ids, $conditions);
foreach ($entityform_types as $entityform_type) {
if (module_exists('path')) {
$entityform_type->paths = array();
$path_types = _entityform_type_get_path_types($entityform_type->type);
foreach ($path_types as $key => $path_type) {
//check for existing alias
$conditions = array(
'source' => $path_type['default_path'],
);
$path = path_load($conditions);
if ($path !== FALSE) {
$entityform_type->paths[$key] = $path;
}
}
}
}
return $entityform_types;
}