controllers/Credential.php
protected function actionListCredential()
    {
        list($selected, $action) = $this->getPostedAction();

        $deleted = 0;

        foreach ($selected as $id) {
            if ($action === 'delete' && $this->access('module_gapi_credential_delete')) {
                $credential = $this->credential->get($id);
                $deleted += (int) $this->credential->callHandler($credential['type'], 'delete', array(
                    $credential['credential_id']));
            }
        }

        if ($deleted > 0) {
            $message = $this->text('Deleted %num item(s)', array('%num' => $deleted));
            $this->setMessage($message, 'success');
        }
    }
protected function actionListCredential()
    {
        list($selected, $action) = $this->getPostedAction();

        $deleted = 0;

        foreach ($selected as $id) {
            if ($action === 'delete' && $this->access('module_gapi_credential_delete')) {
                $credential = $this->credential->get($id);
                $deleted += (int) $this->credential->callHandler($credential['type'], 'delete', array(
                    $credential['credential_id']));
            }
        }

        if ($deleted > 0) {
            $message = $this->text('Deleted %num item(s)', array('%num' => $deleted));
            $this->setMessage($message, 'success');
        }
    }
protected function actionListCredential ( ) { list ( $ selected , $ action ) = $ this -> getPostedAction ( ) ; $ deleted = 0 ; foreach ( $ selected as $ id ) { if ( $ action === 'delete' && $ this -> access ( 'module_gapi_credential_delete' ) ) { $ credential = $ this -> credential -> get ( $ id ) ; $ deleted += ( int ) $ this -> credential -> callHandler ( $ credential [ 'type' ] , 'delete' , array ( $ credential [ 'credential_id' ] ) ) ; } } if ( $ deleted > 0 ) { $ message = $ this -> text ( 'Deleted %num item(s)' , array ( '%num' => $ deleted ) ) ; $ this -> setMessage ( $ message , 'success' ) ; } }
Applies an action to the selected credentials
Applies an action to the selected credentials