mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
686112aa10
Type is used for the widget classname Better scaffolding of formfields Fix typo in filename
29 lines
560 B
PHP
29 lines
560 B
PHP
<?php
|
|
|
|
if(!class_exists('Widget')) return;
|
|
|
|
/**
|
|
* @deprecated since version 2.0
|
|
*/
|
|
class ArchiveWidget extends BlogArchiveWidget implements MigratableObject {
|
|
|
|
private static $db = array(
|
|
'DisplayMode' => 'Varchar'
|
|
);
|
|
|
|
private static $only_available_in = array('none');
|
|
|
|
public function canCreate($member = null) {
|
|
// Deprecated
|
|
return false;
|
|
}
|
|
|
|
public function up() {
|
|
if($this->DisplayMode) {
|
|
$this->ArchiveType = ($this->DisplayMode === 'year') ? 'Yearly' : 'Monthly';
|
|
}
|
|
$this->ClassName = 'BlogArchiveWidget';
|
|
$this->write();
|
|
}
|
|
}
|