Ejemplo n.º 1
0
 /**
  * Get all the markdown lorem text
  *
  * @return string $markdown
  */
 protected static function _getMarkdownLoremText()
 {
     if (null === self::$_markdownLoremText) {
         self::$_markdownLoremText = implode('', file(dirname(__FILE__) . '/../../data/lorem/markdown'));
     }
     return self::$_markdownLoremText;
 }
 public function customInstall($installVars)
 {
     $installVars['content']['sfSympalBlogPost']['teaser'] = 'This is the teaser line for the sample blog post';
     $installVars['content']->save();
     $installVars['contentType']->setTemplate('default_view');
     $installVars['contentType']->save();
     $slot = $installVars['content']->getOrCreateSlot('body', 'Markdown');
     $slot->setValue(sfSympalLorem::getMarkdownLorem(1));
     $slot->save();
     $installVars['menuItem']['name'] = 'Blog';
     $installVars['menuItem']['label'] = 'Blog';
     $this->saveMenuItem($installVars['menuItem']);
     $installVars['contentList']->setTemplate('sympal_blog/list');
     $installVars['contentList']->sort_column = 'id';
     $installVars['contentList']->sort_order = 'DESC';
     $installVars['contentList']->save();
 }