code/model/KapostObject.php
protected function onBeforeWrite() {
        parent::onBeforeWrite();
        
        //If the title is not present make one from the translated singular name and the Kapost Reference ID
        $title=$this->Title;
        if(empty($title)) {
            $this->Title=$this->i18n_singular_name().': '.$this->KapostRefID;
        }
    }
protected function onBeforeWrite() {
        parent::onBeforeWrite();
        
        //If the title is not present make one from the translated singular name and the Kapost Reference ID
        $title=$this->Title;
        if(empty($title)) {
            $this->Title=$this->i18n_singular_name().': '.$this->KapostRefID;
        }
    }
protected function onBeforeWrite ( ) { parent :: onBeforeWrite ( ) ; //If the title is not present make one from the translated singular name and the Kapost Reference ID $ title = $ this -> Title ; if ( empty ( $ title ) ) { $ this -> Title = $ this -> i18n_singular_name ( ) . ': ' . $ this -> KapostRefID ; } }
Ensures a title is present for the Kapost Object before writing
Ensures a title is present for the Kapost Object before writing