Skip to content

Commit

Permalink
Improved initial content
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagocamposviana committed Dec 18, 2013
1 parent 44722e2 commit ad63c77
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 7 deletions.
122 changes: 115 additions & 7 deletions Command/CreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,54 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$created = $this->createContent($created->versionInfo->contentInfo->mainLocationId,
'infobox', $fieldsInfo);





$fields = array(

array('name'=>'title', 'value'=>'Multibanner'),
);

$created = $this->createContent(2, 'multibanner', $fields);

$content = array(
array('name'=>'Banner 1', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image5_banner.jpg'),
array('name'=>'Banner 2', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image1_banner.jpg')
);

$locationId = (int)$created->versionInfo->contentInfo->mainLocationId;
foreach($content as $item){

$fields = array(
array('name'=>'title', 'value'=>$item['name']),
array('name'=>'image', 'value'=>$item['img'])
);

$this->createContent($locationId, 'banner', $fields);
}











$fields = array(

array('name'=>'title', 'value'=>'Block')
array('name'=>'title', 'value'=>'Block'),
array('name'=>'columns', 'value'=> 2)
);

$created = $this->createContent(2, 'block', $fields);

$content = array(
array('name'=>'Harder', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/blossom.png'),
array('name'=>'Better', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/bubbles.jpg'),
array('name'=>'Faster', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/buttercup.png')
array('name'=>'Item 1', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image12_box.jpg'),
array('name'=>'Item 2', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image11_box.jpg')
);

$locationId = (int)$created->versionInfo->contentInfo->mainLocationId;
Expand All @@ -104,6 +141,67 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$this->createContent($locationId, 'block_item', $fields);
}

$fields = array(

array('name'=>'title', 'value'=>'Block'),
array('name'=>'columns', 'value'=> 3)
);

$created = $this->createContent(2, 'block', $fields);

$content = array(
array('name'=>'Item 3', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image10_box.jpg'),
array('name'=>'Item 4', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image9_box.jpg'),
array('name'=>'Item 5', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image8_box.jpg')

);

$locationId = (int)$created->versionInfo->contentInfo->mainLocationId;
foreach($content as $item){

$fields = array(
array('name'=>'title', 'value'=>$item['name']),
array('name'=>'image', 'value'=>$item['img'])
);

$this->createContent($locationId, 'block_item', $fields);
}






$fields = array(

array('name'=>'title', 'value'=>'Block'),
array('name'=>'columns', 'value'=> 4)
);

$created = $this->createContent(2, 'block', $fields);

$content = array(
array('name'=>'Item 6', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image7_box.jpg'),
array('name'=>'Item 7', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image6_box.jpg'),
array('name'=>'Item 8', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image5_box.jpg'),
array('name'=>'Item 9', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image4_box.jpg')

);

$locationId = (int)$created->versionInfo->contentInfo->mainLocationId;
foreach($content as $item){

$fields = array(
array('name'=>'title', 'value'=>$item['name']),
array('name'=>'image', 'value'=>$item['img'])
);

$this->createContent($locationId, 'block_item', $fields);
}





$fields = array(

Expand Down Expand Up @@ -142,9 +240,19 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$created = $this->createContent(2, 'gallery', $fields);

$content = array(
array('name'=>'Harder', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/blossom.png'),
array('name'=>'Better', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/bubbles.jpg'),
array('name'=>'Faster', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/buttercup.png')
array('name'=>'Image 1', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image1_box.jpg'),
array('name'=>'Image 2', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image2_box.jpg'),
array('name'=>'Image 3', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image3_box.jpg'),
array('name'=>'Image 4', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image4_box.jpg'),
array('name'=>'Image 5', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image5_box.jpg'),
array('name'=>'Image 6', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image6_box.jpg'),
array('name'=>'Image 7', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image7_box.jpg'),
array('name'=>'Image 8', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image8_box.jpg'),
array('name'=>'Image 9', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image9_box.jpg'),
array('name'=>'Image 10', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image10_box.jpg'),
array('name'=>'Image 11', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image11_box.jpg'),
array('name'=>'Image 12', 'img'=>str_replace('/web','', getcwd() ) .'/src/Tutei/BaseBundle/SetupFiles/content_files/image12_box.jpg')

);

$locationId = (int)$created->versionInfo->contentInfo->mainLocationId;
Expand Down
Binary file removed SetupFiles/content_files/blossom.png
Binary file not shown.
Binary file removed SetupFiles/content_files/bubbles.jpg
Binary file not shown.
Binary file removed SetupFiles/content_files/buttercup.png
Binary file not shown.
Binary file removed SetupFiles/content_files/developit.jpg
Binary file not shown.

0 comments on commit ad63c77

Please sign in to comment.