1. Go to this page and download the library: Download zenstruck/content-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zenstruck / content-bundle example snippets
// path/to/your/bundle/Entity/Node.php
namespace YourApplicationBundle\Entity;
use Zenstruck\Bundle\ContentBundle\Entity\Node as BaseNode;
/**
* @orm:Entity
*/
class Node extends BaseNode
{
// add any node fields (or leave empty)
}
// path/to/your/bundle/Entity/BlogPost.php
namespace YourApplicationBundle\Entity;
/**
* @orm:Entity
*/
class BlogPost extends Node
{
/**
* @orm:Column(type="text", nullable=true)
*/
protected $body;
public function getBody()
{
return $this->body;
}
public function setBody($body)
{
$this->body = $body;
}
}