Jarves\Model\Content::setType PHP Method

setType() public method

public setType ( $v )
    public function setType($v)
    {
        return parent::setType(strtolower($v));
    }

Usage Example

Example #1
0
 /**
  * @static
  *
  * @param Node $pNode
  * @param array $pBoxedContents
  */
 function installContents(Node $pNode, $pBoxedContents)
 {
     if (!is_array($pBoxedContents)) {
         return;
     }
     /**
      * 0: type74
      * 1: title
      * 2: template
      * 3: content
      *
      */
     foreach ($pBoxedContents as $boxId => $contents) {
         foreach ($contents as $content) {
             $oContent = new Content();
             $oContent->setNodeId($pNode->getId());
             $oContent->setBoxId($boxId);
             $oContent->setType($content[0]);
             $oContent->setTemplate($content[2]);
             $oContent->setContent($content[3]);
             $oContent->save();
         }
     }
 }
All Usage Examples Of Jarves\Model\Content::setType
Content