Hooks::is_plugin_activated ( $plugin )
Checks if a particular plugin is activated
Return: (mixed)
Source file: app/src/Hooks.php
Used by
Uses
- app/functions/global-function.php: _etsis_flash()
Source
public function is_plugin_activated($plugin) { try { $active = $this->app->db->plugin()->where('location = ?', $plugin); $q = $active->find(function ($data) { $array = []; foreach ($data as $d) { $array[] = $d; } return $array; }); if (count($q) > 0) return true; return false; } catch (NotFoundException $e) { Cascade::getLogger('error')->error(sprintf('SQLSTATE[%s]: Error: %s', $e->getCode(), $e->getMessage())); _etsis_flash()->error(_etsis_flash()->notice(409)); } catch (ORMException $e) { Cascade::getLogger('error')->error(sprintf('SQLSTATE[%s]: Error: %s', $e->getCode(), $e->getMessage())); _etsis_flash()->error(_etsis_flash()->notice(409)); } catch (Exception $e) { Cascade::getLogger('error')->error(sprintf('SQLSTATE[%s]: Error: %s', $e->getCode(), $e->getMessage())); _etsis_flash()->error(_etsis_flash()->notice(409)); } }
Expand full source code Collapse full source code View on Github
Changelog
- Since: eduTrac SIS 1.0.1