Serverfireteam\Panel\LinkController::edit PHP Method

edit() public method

public edit ( $entity )
    public function edit($entity)
    {
        parent::edit($entity);
        $this->edit = \DataEdit::source(new Link());
        Link::creating(function ($link) {
            $appHelper = new libs\AppHelper();
            return class_exists($appHelper->getNameSpace() . $link['url']);
        });
        $helpMessage = \Lang::get('panel::fields.links_help');
        $this->edit->label('Edit Links');
        $this->edit->link("rapyd-demo/filter", "Articles", "TR")->back();
        $this->edit->add('display', 'Display', 'text')->rule('required');
        $this->edit->add('url', 'link', 'text')->rule('required');
        $this->edit->add('show_menu', 'Show in Menu', 'checkbox');
        $this->edit->saved(function () use($entity) {
            $this->edit->message(\Lang::get('panel::fields.dataSavedSuccessfull'));
            $this->edit->link('panel/Permission/all', \Lang::get('panel::fields.back'));
        });
        $this->addHelperMessage($helpMessage);
        return $this->returnEditView();
    }
LinkController