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

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

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

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

            $session = Session::getInstance();
            $session->setEphemeral('notification', serialize(new NotificationBootstrap('Bank has been created!')));

            Server::getInstance()->redirect('/bank/edit/' . $bank->getId());
        }

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

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

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

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

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

            $session = Session::getInstance();
            $session->setEphemeral('notification', serialize(new NotificationBootstrap('Bank has been created!')));

            Server::getInstance()->redirect('/bank/edit/' . $bank->getId());
        }

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

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

@return Template