Inheritance: extends Zend_Controller_Action
 public function filters()
 {
     return CMap::mergeArray(parent::filters(), [['application.modules.social.components.filters.ViewsSaveFilter', 'model_id' => 'Page']]);
 }
Exemple #2
0
});
$routes->get('/employee/login', function () {
    EmployeeController::employee_login_page();
});
$routes->post('/logout', function () {
    SiteController::logout();
});
$routes->post('/userlogin', function () {
    ClientController::client_login();
});
//client
$routes->post('/asiakkaat/store', function () {
    ClientController::store();
});
$routes->get('/asiakkaat/omattiedot', function () {
    ClientController::show();
});
// VANHAT VERSIOT TÄSTÄ ALESPÄIN
$routes->get('/hiekkalaatikko', function () {
    HelloWorldController::sandbox();
});
$routes->get('/etusivu', function () {
    HelloWorldController::etusivu();
});
$routes->get('/palvelu', function () {
    HelloWorldController::service_list();
});
$routes->get('/tyontekija/', function () {
    HelloWorldController::employee_list();
});
$routes->get('/tyontekija/1', function () {
Exemple #3
0
 public function saveclient()
 {
     return ClientController::save(null, true);
 }
 private function addClient($client_data)
 {
     foreach ($client_data as $key => $value) {
         if (isset($value)) {
             //Checking the required params.
             foreach (self::$REQUIRED_PARAMS as $param) {
                 if (!isset($value[$param]) || $value[$param] == '') {
                     self::$is_missing_param = true;
                     break;
                 }
             }
             //if not found any missing terms.
             if (!self::$is_missing_param) {
                 $value['added_by'] = SessionCache::get('user_id');
                 $user_dao = DAOFactory::getDAO('UserDAO');
                 $activation_code = $user_dao->create($value);
                 if ($activation_code != false) {
                     //add in queue of nodejs to send mail
                     //@send mail through node.js , we will add the contents in queue.
                 }
                 self::$is_missing_param = false;
             } else {
                 //$this->sendJsonResponse(0,$msg);
             }
         }
     }
 }