protected function createElement(&$sorting, $type=ContentWrapper\Model::TYPE_SEPARATOR)
	{
		$model = new \ContentModel();

		if($type == ContentWrapper\Model::TYPE_START) {
			$sorting = $sorting - 2;
		}
		else {
			$sorting = $sorting + 2;
			$model->bootstrap_parentId = $this->objModel->id;
		}

		$model->tstamp  = time();
		$model->pid     = $this->objModel->pid;
		$model->ptable  = $this->objModel->ptable;
		$model->type    = $this->objModel->getTypeName($type);
		$model->sorting = $sorting;

		$model->save();

		return $model;
	}
protected function createElement(&$sorting, $type=ContentWrapper\Model::TYPE_SEPARATOR)
	{
		$model = new \ContentModel();

		if($type == ContentWrapper\Model::TYPE_START) {
			$sorting = $sorting - 2;
		}
		else {
			$sorting = $sorting + 2;
			$model->bootstrap_parentId = $this->objModel->id;
		}

		$model->tstamp  = time();
		$model->pid     = $this->objModel->pid;
		$model->ptable  = $this->objModel->ptable;
		$model->type    = $this->objModel->getTypeName($type);
		$model->sorting = $sorting;

		$model->save();

		return $model;
	}
protected function createElement ( & $ sorting , $ type = ContentWrapper \ Model :: TYPE_SEPARATOR ) { $ model = new \ ContentModel ( ) ; if ( $ type == ContentWrapper \ Model :: TYPE_START ) { $ sorting = $ sorting - 2 ; } else { $ sorting = $ sorting + 2 ; $ model -> bootstrap_parentId = $ this -> objModel -> id ; } $ model -> tstamp = time ( ) ; $ model -> pid = $ this -> objModel -> pid ; $ model -> ptable = $ this -> objModel -> ptable ; $ model -> type = $ this -> objModel -> getTypeName ( $ type ) ; $ model -> sorting = $ sorting ; $ model -> save ( ) ; return $ model ; }
Create a new wrapper element

@param int                 $sorting
@param string              $type

@return ContentWrapper\Model
Create a new wrapper element