public function execute()
    {
        $stockistId = $this->_initStockist();
        /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
        $resultPage = $this->resultPageFactory->create();
        $resultPage->setActiveMenu('Limesharp_Stockists::stores');
        $resultPage->getConfig()->getTitle()->prepend(__('Stockists'));
        $resultPage->addBreadcrumb(__('Stockists'), __('Stockists'), $this->getUrl('stockists/stores'));

        if ($stockistId === null) {
            $resultPage->addBreadcrumb(__('New Store'), __('New Store'));
            $resultPage->getConfig()->getTitle()->prepend(__('New Store'));
        } else {
            $resultPage->addBreadcrumb(__('Edit Store'), __('Edit Store'));
            $resultPage->getConfig()->getTitle()->prepend(
                $this->stockistRepository->getById($stockistId)->getName()
            );
        }
        return $resultPage;
    }
public function execute()
    {
        $stockistId = $this->_initStockist();
        /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
        $resultPage = $this->resultPageFactory->create();
        $resultPage->setActiveMenu('Limesharp_Stockists::stores');
        $resultPage->getConfig()->getTitle()->prepend(__('Stockists'));
        $resultPage->addBreadcrumb(__('Stockists'), __('Stockists'), $this->getUrl('stockists/stores'));

        if ($stockistId === null) {
            $resultPage->addBreadcrumb(__('New Store'), __('New Store'));
            $resultPage->getConfig()->getTitle()->prepend(__('New Store'));
        } else {
            $resultPage->addBreadcrumb(__('Edit Store'), __('Edit Store'));
            $resultPage->getConfig()->getTitle()->prepend(
                $this->stockistRepository->getById($stockistId)->getName()
            );
        }
        return $resultPage;
    }
public function execute ( ) { $ stockistId = $ this -> _initStockist ( ) ; /** @var \Magento\Backend\Model\View\Result\Page $resultPage */ $ resultPage = $ this -> resultPageFactory -> create ( ) ; $ resultPage -> setActiveMenu ( 'Limesharp_Stockists::stores' ) ; $ resultPage -> getConfig ( ) -> getTitle ( ) -> prepend ( __ ( 'Stockists' ) ) ; $ resultPage -> addBreadcrumb ( __ ( 'Stockists' ) , __ ( 'Stockists' ) , $ this -> getUrl ( 'stockists/stores' ) ) ; if ( $ stockistId === null ) { $ resultPage -> addBreadcrumb ( __ ( 'New Store' ) , __ ( 'New Store' ) ) ; $ resultPage -> getConfig ( ) -> getTitle ( ) -> prepend ( __ ( 'New Store' ) ) ; } else { $ resultPage -> addBreadcrumb ( __ ( 'Edit Store' ) , __ ( 'Edit Store' ) ) ; $ resultPage -> getConfig ( ) -> getTitle ( ) -> prepend ( $ this -> stockistRepository -> getById ( $ stockistId ) -> getName ( ) ) ; } return $ resultPage ; }
Edit or create stockist

@return \Magento\Backend\Model\View\Result\Page
Edit or create stockist