function testSortByTitle()
 {
     $cloud = new BlogCategoryCloud();
     $cloud->setSort('Weight');
     $cats = $cloud->Categories();
     $this->assertEquals(array('four-holder2', 'one', 'three', 'two'), $cats->column('Title'));
 }
 /**
  * @param Int $limit
  * @return BlogCategoryCloud
  */
 public function getBlogCategoryCloud($limit = 10)
 {
     $cloud = BlogCategoryCloud::create();
     if (Config::inst()->get('BlogCategory', 'limit_to_holder')) {
         $cloud->setHolderId($this->owner->ParentID);
     }
     if ($limit) {
         $cloud->setLimit($limit);
     }
     return $cloud;
 }
 function getBlogCategoryCloud($limit = 10)
 {
     $container = BlogTree::current();
     $cloud = BlogCategoryCloud::create();
     if (Config::inst()->get('BlogCategory', 'limit_to_holder')) {
         $cloud->setHolderId($container->ID);
     }
     if ($limit) {
         $cloud->setLimit($limit);
     }
     if ($this->Limit >= 1) {
         $cloud->setLimit($this->Limit);
     }
     return $cloud;
 }