Ejemplo n.º 1
0
 /**
  * @see	\cms\system\content\type\AbstractStructureContentType::getChildCSSClasses()
  */
 public function getChildCSSClasses(Content $content)
 {
     $parent = $content->getParentContent();
     if ($parent->width != "") {
         $width = array(substr($parent->width, 0, 2), substr($parent->width, 2, 2));
     } else {
         $width = array(50, 50);
     }
     $width = $content->showOrder % 2 == 1 ? $width[0] : $width[1];
     return 'grid grid' . $width;
 }
Ejemplo n.º 2
0
 /**
  * @see	\cms\system\content\type\IContentType::getOutput()
  */
 public function getOutput(Content $content)
 {
     switch ($content->type) {
         case "children":
             $menuItems = $content->getPage()->getChildrenTree($content->depth ? intval($content->depth) - 1 : null);
             break;
         case "all":
             $nodeTree = new AccessiblePageNodeTree();
             $menuItems = $nodeTree->getIterator();
             if ($content->depth) {
                 $menuItems->setMaxDepth(intval($content->depth) - 1);
             }
             break;
     }
     WCF::getTPL()->assign(array('menuItems' => $menuItems));
     return parent::getOutput($content);
 }
 /**
  * @see	\cms\system\content\type\AbstractStructureContentType::getChildCSSClasses()
  */
 public function getChildCSSClasses(Content $content)
 {
     $parent = $content->getParentContent();
     if ($parent->width != "") {
         $width = array(substr($parent->width, 0, 2), substr($parent->width, 2, 2), substr($parent->width, 4, 2));
     } else {
         $width = array(33, 33, 33);
     }
     switch ($content->showOrder % 3) {
         case 0:
             $gridWidth = $width[2];
             break;
         case 1:
             $gridWidth = $width[0];
             break;
         case 2:
             $gridWidth = $width[1];
             break;
     }
     return 'grid grid' . $gridWidth;
 }
 /**
  * @see    \cms\system\content\type\IContentType::getOutput()
  */
 public function getOutput(Content $content)
 {
     $memberList = new MemberList(array());
     $memberList->setRealm($content->__get('realm'));
     $memberList->setGuild($content->__get('guild'));
     $memberList->setKey($content->__get('key'));
     $memberList->setLocal($content->__get('local'));
     $memberList->setGuildRankPrefix($content->__get('guildrank'));
     $memberList->setMemberBackground($content->__get('memberbackground'));
     $memberList->setRankHeadings($content);
     $memberList->setBackgroundPicture($content->__get('picture'));
     $memberList->setHordeOrAlliance($content->__get('hordeOrAlliance'));
     return $memberList->render();
 }
Ejemplo n.º 5
0
 /**
  * Init Ranks
  *
  * @return $this
  */
 private function initRanks()
 {
     /** @var RoosterMember $member */
     foreach ($this->member as $member) {
         $rankId = $member->getRankIndex();
         if (!isset($this->ranks[(int) $rankId])) {
             $guildRank = new GuildRank(array());
             $this->ranks[(int) $rankId] = $guildRank;
             $guildRank->setName($this->rankHeadings->__get('rank_' . ($rankId + 1)));
             $guildRank->setIsText($this->rankHeadings->__get('rank_is_image_' . ($rankId + 1)) == 1);
         }
         $this->ranks[(int) $rankId]->addMember($member);
     }
     return $this;
 }
Ejemplo n.º 6
0
 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     if (empty($_POST)) {
         $this->title = $this->content->getTitle();
         I18nHandler::getInstance()->setOptions('title', PACKAGE_ID, $this->content->title, 'cms.content.title\\d+');
         $this->pageID = $this->content->pageID;
         $this->cssClasses = $this->content->cssClasses;
         $this->parentID = $this->content->parentID;
         $this->showOrder = $this->content->showOrder;
         $this->position = $this->content->position;
         $this->contentData = $this->content->contentData;
         if ($this->objectType->objectType == 'de.codequake.cms.content.type.poll') {
             PollManager::getInstance()->setObject('de.codequake.cms.content', $this->content->contentID, $this->contentData['pollID']);
         }
         foreach ($this->objectType->getProcessor()->multilingualFields as $field) {
             I18nHandler::getInstance()->setOptions($field, PACKAGE_ID, $this->contentData[$field], 'cms.content.' . $field . '\\d+');
         }
     }
     // overwrite content list
     $this->contentList = new DrainedPositionContentNodeTree(null, $this->pageID, $this->contentID, $this->position);
     $this->contentList = $this->contentList->getIterator();
 }
Ejemplo n.º 7
0
 /**
  * @see	\cms\system\content\type\IContentType::getOutput()
  */
 public function getOutput(Content $content)
 {
     WCF::getTPL()->assign('poll', $content->getPoll());
     return WCF::getTPL()->fetch('poll', 'wcf');
 }