symfony-cmf/MenuBundle — pull request #68 by dantleech (2013-06-12 19:37:39+00:00)
Title: [WIP] Refactored allow empty

I don't like declaring options in the constructor, its not very flexible. Have changed to a method call and also fixed the test.

Also, I don't understand this logic:

````
if (!$this->allowEmptyItems) {
return null
}
````

Surely that should be `if $this->allowEmptyItems === true return null`?. Throwing an exception would seem to indicate that empty items are not allowed. Also, can we be more concise with the naming - what are we allowing here? What is an empty item? The logic would seem to indicate "allowRouteNotFound" - but is maybe more acurate if we refactor it to "allowEmptyContent" ?

Just my thoughts.