silverstripe-blog/code/compat/widgets/TagCloudWidget.php

44 lines
616 B
PHP
Raw Normal View History

2015-02-08 08:03:55 +01:00
<?php
2015-05-09 16:33:12 +02:00
if(!class_exists('Widget')) {
return;
}
2015-02-08 08:03:55 +01:00
/**
2015-05-09 16:33:12 +02:00
* A list of tags associated with blog posts.
2015-02-08 08:03:55 +01:00
*
* @package blog
*/
class TagCloudWidget extends BlogTagsWidget implements MigratableObject {
2015-05-09 16:33:12 +02:00
/**
* @var array
*/
2015-02-08 08:03:55 +01:00
private static $db = array(
2015-05-09 16:33:12 +02:00
'Title' => 'Varchar',
'Limit' => 'Int',
'Sortby' => 'Varchar',
2015-02-08 08:03:55 +01:00
);
2015-05-09 16:33:12 +02:00
/**
* @var array
*/
private static $only_available_in = array(
'none',
);
2015-02-08 08:03:55 +01:00
2015-05-09 16:33:12 +02:00
/**
* {@inheritdoc}
*/
2015-02-08 08:03:55 +01:00
public function canCreate($member = null) {
return false;
}
2015-05-09 16:33:12 +02:00
/**
* {@inheritdoc}
*/
2015-02-08 08:03:55 +01:00
public function up() {
$this->ClassName = 'BlogTagsWidget';
$this->write();
}
2015-05-09 16:33:12 +02:00
}