Microweber\Providers\FormsManager::delete_entry PHP Method

delete_entry() public method

public delete_entry ( $data )
    public function delete_entry($data)
    {
        $adm = $this->app->user_manager->is_admin();
        if ($adm == false) {
            return array('error' => 'Error: not logged in as admin.' . __FILE__ . __LINE__);
        }
        if (isset($data['id'])) {
            $c_id = intval($data['id']);
            $this->app->database_manager->delete_by_id('forms_data', $c_id);
        }
        $this->app->cache_manager->delete('forms_data');
        $this->app->cache_manager->delete('forms');
        return true;
    }