Skip to content

Commit d9c6620

Browse files
committed
Merge pull request #38 from symfony-cmf/update-blogbundle
update to be compatible with current sonata admin
2 parents e64a515 + ff84efe commit d9c6620

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

Admin/PostAdmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ protected function configureFormFields(FormMapper $mapper)
2525
// but I don't know how integrate the form
2626
// AND have all the Sonata magic from the
2727
// FormMapper->add method.
28-
28+
2929
// $csvToArrayTransformer = new CsvToArrayTransformer;
3030

3131
$mapper->add('title');

Document/Blog.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,9 @@ public function getSubRoutes($routeClass)
121121

122122
return $subRoutes;
123123
}
124+
125+
public function __toString()
126+
{
127+
return (string) $this->name;
128+
}
124129
}

Document/Post.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Post implements RouteReferrersReadInterface, PublishTimePeriodInterface, P
8080
* If the document should be publishable
8181
* @var Boolean
8282
*/
83-
protected $isPublishable;
83+
protected $isPublishable = true;
8484

8585
public function __construct()
8686
{
@@ -200,4 +200,9 @@ public function setPublishEndDate(\DateTime $publishEndDate = null)
200200
{
201201
$this->publishEndDate = $publishEndDate;
202202
}
203+
204+
public function __toString()
205+
{
206+
return (string) $this->name;
207+
}
203208
}

0 commit comments

Comments
 (0)