public function modal($type)
    {
        $trimmed_item = $this->trimmedModel();

        $modalId = $type.$trimmed_item.'Modal';

        $display = $this->getModelDisplayName();

        $modal = (object) [
            'id' => $modalId,
            'title' => ucfirst($type).' '.$display,
            'url' => $this->modalUrl($type),
        ];

        return $modal;
    }
public function modal($type)
    {
        $trimmed_item = $this->trimmedModel();

        $modalId = $type.$trimmed_item.'Modal';

        $display = $this->getModelDisplayName();

        $modal = (object) [
            'id' => $modalId,
            'title' => ucfirst($type).' '.$display,
            'url' => $this->modalUrl($type),
        ];

        return $modal;
    }
public function modal ( $ type ) { $ trimmed_item = $ this -> trimmedModel ( ) ; $ modalId = $ type . $ trimmed_item . 'Modal' ; $ display = $ this -> getModelDisplayName ( ) ; $ modal = ( object ) [ 'id' => $ modalId , 'title' => ucfirst ( $ type ) . ' ' . $ display , 'url' => $ this -> modalUrl ( $ type ) , ] ; return $ modal ; }
Generate a modal for a model.
@param string $type Modal type (edit, create, delete).
@return object
Generate a modal for a model .