Content

This document is about how to set up and use a Content object.

Table of contents

First steps

Create a content object and give it some static objects which are always needed:

<?php 

use IDML\Content\BackingStory;
use IDML\Content\Container;
use IDML\Content\DesignMap;
use IDML\Content\Tag;

$content = new IDML\Content();
$content
    ->addBackingStory(new BackingStory())
    ->addContainer(new Container())
    ->addDesignMap(new DesignMap())
    ->addTag(new Tag())
;

Language

The language can be set with the help of the Content Language Enum.

<?php

use IDML\Content\Enum\Content\Language;

/**
 * This will set the language to german. 
 */
$content->setLanguage(Language::DE_DE_2006());