Ejemplo n.º 1
0
 public function save($postId)
 {
     $directorEntity = new DirectorEntity($postId);
     if ($directorEntity->getType() == DirectorHelper::DIRECTOR_POST_TYPE) {
         if (isset($_FILES) && $_FILES["file"]["name"] != "") {
             $fileArray = FileHelper::uploadFile("file");
             $directorEntity->setFileName($fileArray["fileName"]);
             $directorEntity->setFileUrl($fileArray["fileUrl"]);
             $directorEntity->setFileSize($fileArray["fileSize"]);
         }
     }
 }
Ejemplo n.º 2
0
 public function createColumnContent($columnName, $postId)
 {
     if ($columnName == 'board_media_category') {
         $p = new DirectorEntity($postId);
         $cat = $p->getCategory();
         if ($cat == "Media") {
             echo "<div style='background-color: rgb(145, 15, 15); color: #fff; padding: 5px; border-radius: 3px; width: 120px; text-align: center;'>" . $cat . "</div>";
         } else {
             echo "<div style='background-color: rgb(15, 130, 145); color: #fff; padding: 5px; border-radius: 3px; width: 120px; text-align: center;'>" . $cat . "</div>";
         }
     }
 }
Ejemplo n.º 3
0
<?php

use Director\Entity\DirectorEntity;
$p = new DirectorEntity(get_the_ID());
if ($p->getCategory() == "Media") {
    header('Location: /media');
} else {
    header('Location: /about/board');
}