Beispiel #1
0
 public function form()
 {
     if (!OW::getUser()->isAuthenticated()) {
         exit;
     }
     $type = $_POST['type'];
     $id = $_POST['id'];
     $title = $_POST['title'];
     $url = $_POST['url'];
     $langKey = $_POST['langKey'];
     $cmp = new BASE_CMP_Flag($type, $id, $title, $url, $langKey);
     if (BOL_FlagService::getInstance()->isFlagged($type, $id, OW::getUser()->getId())) {
         exit(json_encode(array("isFlagged" => true)));
     }
     exit(json_encode(array('markup' => $cmp->render(), 'js' => OW::getDocument()->getOnloadScript(), 'include_js' => OW::getDocument()->getScripts(), 'css' => '.foo ul li{ float: left; width: 100px !important;}')));
 }
Beispiel #2
0
 public function __construct($entityType, $entityId)
 {
     parent::__construct($entityType, $entityId);
     $this->setTemplate(OW::getPluginManager()->getPlugin("base")->getMobileCmpViewDir() . "flag.html");
 }