public function application_manager::get_application in Apply for role 8
Helper function to get a singular application.
Parameters
int $aid:
Return value
object|bool Returns an application object or FALSE if no application
2 calls to application_manager::get_application()
File
- src/
application_manager.php, line 51 - Contains two classes.
Class
- application_manager
- Application manager object used for performing any tasks relating to applications.
Namespace
Drupal\apply_for_roleCode
public function get_application($aid) {
$select = Database::getConnection()
->select('apply_for_role_applications', 'a')
->fields('a');
$select
->condition('a.aid', $aid);
$db_app_data = $select
->execute()
->fetchAll(\PDO::FETCH_ASSOC);
if (count($db_app_data) == 1) {
return $this
->map_application_db_response_to_application($db_app_data[0]);
}
else {
return FALSE;
}
}