src/Charcoal/Admin/Widget/FormSidebarWidget.php
public function isObjRevisionable()
    {
        if ($this->isObjRevisionable === null) {
            // Overridden by permissions
            if (!$this->checkPermission('revision') || !$this->form()) {
                $this->isObjRevisionable = false;
            } else {
                $obj = $this->form()->obj();
                if (!$obj->id()) {
                    $this->isObjRevisionable = false;
                    return $this->isObjRevisionable;
                }

                if ($obj instanceof RevisionableInterface && $obj->revisionEnabled()) {
                    $this->isObjRevisionable = !!count($obj->allRevisions());
                }
            }
        }

        return $this->isObjRevisionable;
    }
public function isObjRevisionable()
    {
        if ($this->isObjRevisionable === null) {
            // Overridden by permissions
            if (!$this->checkPermission('revision') || !$this->form()) {
                $this->isObjRevisionable = false;
            } else {
                $obj = $this->form()->obj();
                if (!$obj->id()) {
                    $this->isObjRevisionable = false;
                    return $this->isObjRevisionable;
                }

                if ($obj instanceof RevisionableInterface && $obj->revisionEnabled()) {
                    $this->isObjRevisionable = !!count($obj->allRevisions());
                }
            }
        }

        return $this->isObjRevisionable;
    }
public function isObjRevisionable ( ) { if ( $ this -> isObjRevisionable === null ) { // Overridden by permissions if ( ! $ this -> checkPermission ( 'revision' ) || ! $ this -> form ( ) ) { $ this -> isObjRevisionable = false ; } else { $ obj = $ this -> form ( ) -> obj ( ) ; if ( ! $ obj -> id ( ) ) { $ this -> isObjRevisionable = false ; return $ this -> isObjRevisionable ; } if ( $ obj instanceof RevisionableInterface && $ obj -> revisionEnabled ( ) ) { $ this -> isObjRevisionable = ! ! count ( $ obj -> allRevisions ( ) ) ; } } } return $ this -> isObjRevisionable ; }
Determine if the object has revisions.

If TRUE, the "Delete" button is shown. The object can still be
deleted programmatically or via direct action on the database.

@return boolean
Determine if the object has revisions .