/*!
\return Returns the content object defining the product.
321690
function contentObject()
    {
        if ( $this->ContentObject === null )
        {
            if ( $this->ContentObjectID == 0 )
            {
                return null;
            }
            $this->ContentObject = eZContentObject::fetch( $this->ContentObjectID );
        }
        return $this->ContentObject;
    }
1301699
public function getResult()
    {
        if ($this->autoFormat && ! empty($this->object)) {
            return $this->object;
        }

        return $this->content;
    }
1339436
public function executeAndReturnContent()
  {
    ob_start();
    Output::$controller = WebApp::$page->controller;
    include $this->file;
    $content = ob_get_contents();
    ob_clean();

    return $content;
  }
108919
function contentObjectByUrl( $params )
    {
        $object = false;

        $node = $this->nodeByUrl( $params );
        if( is_object( $node ) )
        {
            $object = $node->object();
        }

        return $object;
    }
99279
private function getContentType(ValueObject $content)
    {
        if ($content instanceof Content) {
            return $this->repository->getContentTypeService()->loadContentType(
                $content->getVersionInfo()->getContentInfo()->contentTypeId
            );
        } elseif ($content instanceof ContentInfo) {
            return $this->repository->getContentTypeService()->loadContentType($content->contentTypeId);
        }
    }
240816
function itemList( $asObject = true )
    {
        return eZPersistentObject::fetchObjectList( eZProductCollectionItem::definition(),
                                                    null, array( "productcollection_id" => $this->ID ),
                                                    null,
                                                    null,
                                                    $asObject );
    }
754009
function objectAttributeContent( $contentObjectAttribute )
    {
        $data = $contentObjectAttribute->attribute( self::CONTENT_VALUE );
        $classAttribute = $contentObjectAttribute->contentClassAttribute();
        $classContent = $classAttribute->content();
        if ( isset( $classContent['ISBN13'] ) and $classContent['ISBN13'] )
        {
            list ( $prefix, $field1, $field2, $field3, $field4 ) = array_merge( preg_split( '#-#', $data ),
                                                                       array( 0 => '', 1 => '', 2 => '', 3 => '', 4 => '' ) );
            $dataArray = array(  'prefix' => $prefix,
                                 'field1' => $field1, 'field2' => $field2,
                                 'field3' => $field3, 'field4' => $field4,
                                 'value' => $data,
                                 'value_without_hyphens' => str_replace( "-", "", $data ),
                                 'value_with_spaces' => str_replace( "-", " ", $data ) );
            return $dataArray;
        }

        // The array_merge makes sure missing elements gets an empty string instead of NULL
        list ( $field1, $field2, $field3, $field4 ) = array_merge( preg_split( '#-#', $data ),
                                                                   array( 0 => '', 1 => '', 2 => '', 3 => '' ) );
        $isbn = array( 'field1' => $field1, 'field2' => $field2,
                       'field3' => $field3, 'field4' => $field4,
                       'value' => $data,
                       'value_without_hyphens' => str_replace( "-", "", $data ),
                       'value_with_spaces' => str_replace( "-", " ", $data ) );
        return $isbn;
    }
942673
public function getDescription()
    {
        $returnValue = (string) '';

        if (!empty($this->description)){
        	$returnValue = $this->description;
        }

        return (string) $returnValue;
    }
1209174
public function getContents()
    {
        $callback = $this->detach();
        $result = '';
        if (is_callable($callback)) {
            $result = $callback();
        }
        if (!is_string($result)) {
            return '';
        }

        return $result;
    }
1029432
static function fetch( $urlID, $contentObjectAttributeID, $contentObjectAttributeVersion, $asObject = true )
    {
        return eZPersistentObject::fetchObject( eZURLObjectLink::definition(),
                                                null,
                                                array( 'url_id' => $urlID,
                                                       'contentobject_attribute_id' => $contentObjectAttributeID,
                                                       'contentobject_attribute_version' => $contentObjectAttributeVersion ),
                                                $asObject );
    }
16067
public function getContent()
    {
        if (null === $this->content) {
            $this->content = $this->description;
        }

        return $this->content;
    }
187070
function title( $contentObjectAttribute,  $name = "original_filename" )
    {
        $value = false;
        $binaryFile = eZBinaryFile::fetch( $contentObjectAttribute->attribute( 'id' ),
                                           $contentObjectAttribute->attribute( 'version' ) );
        if ( is_object( $binaryFile ) )
            $value = $binaryFile->attribute( $name );

        return $value;
    }
144765
public static function getContentItem($contentReturn, $dataProps)
    {
        global $CFG, $CONTEXT, $USER, $CONTEXT, $LINK;
        $ltiProps = self::getCoreLaunchData();
        $ltiProps[LTIConstants::LTI_MESSAGE_TYPE] = LTIConstants::CONTENT_ITEM_SELECTION_REQUEST;
        $ltiProps[LTIConstants::ACCEPT_MEDIA_TYPES] = LTIConstants::MEDIA_LTILINKITEM;
        $ltiProps[LTIConstants::ACCEPT_PRESENTATION_DOCUMENT_TARGETS] = "iframe,window"; // Nice to add overlay
        $ltiProps[LTIConstants::ACCEPT_UNSIGNED] = "true";
        $ltiProps[LTIConstants::ACCEPT_MULTIPLE] = "false";
        $ltiProps[LTIConstants::ACCEPT_COPY_ADVICE] = "false"; // ???
        $ltiProps[LTIConstants::AUTO_CREATE] = "true";
        $ltiProps[LTIConstants::CAN_CONFIRM] = "false";
        $ltiProps[LTIConstants::CONTENT_ITEM_RETURN_URL] = $contentReturn;
        $ltiProps[LTIConstants::LAUNCH_PRESENTATION_RETURN_URL] = $contentReturn;

        // This is needed to trigger WarpWire to send us back the link
        $ltiProps['tool_consumer_info_product_family_code'] = 'canvas';
        $ltiProps['custom_canvas_course_id'] = $CONTEXT->id;

        return $ltiProps;
    }
183452
public function getContent()
    {
        if ($this->_oContent === null) {
            $this->_oContent = false;
            if ($this->getContentId()) {
                return $this->_oContent;
            }
        }

        return $this->_oContent;
    }
1217042
public function content()
    {
        $content = apply_filters('the_content', $this->thePost()->post_content);
        $content = str_replace(']]>', ']]&gt;', $content);

        return $content;
    }
64485
function objectAttributeContent( $contentObjectAttribute )
    {
        $classAttribute = $contentObjectAttribute->contentClassAttribute();
        $storedPrice = $contentObjectAttribute->attribute( "data_float" );
        $price = new eZPrice( $classAttribute, $contentObjectAttribute, $storedPrice );

        if ( $contentObjectAttribute->attribute( 'data_text' ) != '' )
        {
            list( $vatType, $vatExInc ) = explode( ',', $contentObjectAttribute->attribute( "data_text" ), 2 );

            $price->setAttribute( 'selected_vat_type', $vatType );
            $price->setAttribute( 'is_vat_included', $vatExInc );
        }

        return $price;
    }
336239
public function content($arg=null)
	{
		switch($this->format)
		{
			case 'json':
				if(!isset($arg))
				{
					$arg = false;
				}
				return $this->json($arg);
				break;
			case 'xml' :
				if(!isset($arg))
				{
					$arg = 'dom';
				}
				return $this->xml($arg);
				break;
			default :
				return $this->getContent();
				break;
		}
	}