Beispiel #1
0
 protected function validateShortname($shortname)
 {
     // don't validate or generate a shortname when the post is not enabled
     $publish = $this->ui->getWidget('publish');
     if ($publish->value === BlorgPublishRadioTable::HIDDEN) {
         return;
     }
     $post = new BlorgPost();
     $post->id = $this->id;
     $post->shortname = $shortname;
     $post->publish_date = $publish->getPublishDate();
     return BlorgPost::isShortnameValid($this->app, $post);
 }
Beispiel #2
0
 protected function isShortnameValid(BlorgPost $post, $shortname)
 {
     $post = clone $post;
     $post->shortname = $shortname;
     return BlorgPost::isShortnameValid($this->app, $post);
 }