src/Money/Module/Bank/Controller/Bank.php
public function edit()
    {
        //~ Breadcrumb
        $this->breadcrumb->add((new BreadcrumbItem('Edit'))->setIcon('edit')->setIsActive(true));
        $this->navMenu->getItem('Edit')->setIsActive(true);

        //~ Content
        $this->dataCollection->add('title', 'Edit Bank');

        $bankId = $this->route->getParameterCollection()->getByName('id')->getValue();

        $mapper = new BankMapper(Database::get('money'));
        $bank   = $mapper->findById($bankId);

        $server = Server::getInstance();
        $post   = Post::getInstance();
        if ($server->isPost()) {
            if ($post->get('action', '') === 'save') {
                $bank->setName($post->get('bank_name'));
                $mapper->update($bank);

                $this->notifications->add(new NotificationBootstrap('Bank has been updated !'));
            } else {
                $this->checkDelete();
            }
        }


        $this->dataCollection->add('bank', $bank);

        return $this->getResponse('Edit');
    }
public function edit()
    {
        //~ Breadcrumb
        $this->breadcrumb->add((new BreadcrumbItem('Edit'))->setIcon('edit')->setIsActive(true));
        $this->navMenu->getItem('Edit')->setIsActive(true);

        //~ Content
        $this->dataCollection->add('title', 'Edit Bank');

        $bankId = $this->route->getParameterCollection()->getByName('id')->getValue();

        $mapper = new BankMapper(Database::get('money'));
        $bank   = $mapper->findById($bankId);

        $server = Server::getInstance();
        $post   = Post::getInstance();
        if ($server->isPost()) {
            if ($post->get('action', '') === 'save') {
                $bank->setName($post->get('bank_name'));
                $mapper->update($bank);

                $this->notifications->add(new NotificationBootstrap('Bank has been updated !'));
            } else {
                $this->checkDelete();
            }
        }


        $this->dataCollection->add('bank', $bank);

        return $this->getResponse('Edit');
    }
Main controller action.

@return Template