silverstripe-blog/code/forms/BlogAdminSidebar.php

17 lines
256 B
PHP
Raw Normal View History

<?php
class BlogAdminSidebar extends FieldGroup {
2015-05-09 16:33:12 +02:00
/**
* @return bool
*/
2015-02-02 11:32:40 +01:00
public function isOpen() {
$sidebar = Cookie::get('blog-admin-sidebar');
2015-05-09 16:33:12 +02:00
2015-02-02 11:32:40 +01:00
if($sidebar == 1 || is_null($sidebar)) {
return true;
}
2015-05-09 16:33:12 +02:00
2015-02-02 11:32:40 +01:00
return false;
}
2015-05-09 16:33:12 +02:00
}