public function getPageTypeComposerControlPageNameValue(Page $c)
 {
     $ak = $this->getAttributeKeyObject();
     if (is_object($ak)) {
         return $c->getAttribute($ak->getAttributeKeyHandle());
     }
 }
 public function canPublishPageTypeBeneathTarget(Type $pagetype, \Concrete\Core\Page\Page $page)
 {
     if ($page->getAttribute('blog_section') > 0) {
         return true;
     } else {
         return false;
     }
 }
Example #3
0
 /**
  * Returns the value of the attribute with the handle $ak
  * of the current object.
  *
  * $displayMode makes it possible to get the correct output
  * value. When you need the raw attribute value or object, use
  * this:
  * <code>
  * $c = Page::getCurrentPage();
  * $attributeValue = $c->getAttribute('attribute_handle');
  * </code>
  *
  * But if you need the formatted output supported by some
  * attribute, use this:
  * <code>
  * $c = Page::getCurrentPage();
  * $attributeValue = $c->getAttribute('attribute_handle', 'display');
  * </code>
  *
  * An attribute type like "date" will then return the date in
  * the correct format just like other attributes will show
  * you a nicely formatted output and not just a simple value
  * or object.
  *
  *
  * @param string|object $akHandle
  * @param bool       $displayMode
  *
  * @return type
  */
 public function getAttribute($akHandle, $displayMode = false)
 {
     return parent::getAttribute($akHandle, $displayMode);
 }