|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace Symfony\Cmf\Bundle\MenuBundle\Model; |
| 4 | + |
| 5 | +use Knp\Menu\NodeInterface; |
| 6 | + |
| 7 | +/** |
| 8 | + * Provide access to read and write the menu options. |
| 9 | + * |
| 10 | + * @author Mojtaba Koosej <[email protected]> |
| 11 | + */ |
| 12 | + |
| 13 | +interface MenuOptionsInterface extends NodeInterface |
| 14 | +{ |
| 15 | + /** |
| 16 | + * Whether or not to display this menu |
| 17 | + * |
| 18 | + * @return boolean |
| 19 | + */ |
| 20 | + function getDisplay(); |
| 21 | + |
| 22 | + /** |
| 23 | + * Set whether or not this menu should be displayed |
| 24 | + * |
| 25 | + * @param boolean $bool |
| 26 | + * |
| 27 | + * @return MenuOptionsInterface |
| 28 | + */ |
| 29 | + function setDisplay($bool); |
| 30 | + |
| 31 | + /** |
| 32 | + * Whether or not this menu should show its children. |
| 33 | + * |
| 34 | + * @return boolean |
| 35 | + */ |
| 36 | + function getDisplayChildren(); |
| 37 | + |
| 38 | + /** |
| 39 | + * Set whether or not this menu should show its children |
| 40 | + * |
| 41 | + * @param boolean $bool |
| 42 | + * |
| 43 | + * @return MenuOptionsInterface |
| 44 | + */ |
| 45 | + function setDisplayChildren($bool); |
| 46 | + |
| 47 | + /** |
| 48 | + * Return the attributes associated with this menu node |
| 49 | + * |
| 50 | + * @return array |
| 51 | + */ |
| 52 | + function getAttributes(); |
| 53 | + |
| 54 | + /** |
| 55 | + * Set the attributes associated with this menu node |
| 56 | + * |
| 57 | + * @param $attributes array |
| 58 | + * |
| 59 | + * @return Page The current Page instance |
| 60 | + */ |
| 61 | + function setAttributes(array $attributes); |
| 62 | + |
| 63 | + /** |
| 64 | + * Return the given attribute, optionally specifying a default value |
| 65 | + * |
| 66 | + * @param string $name The name of the attribute to return |
| 67 | + * @param string $default The value to return if the attribute doesn't exist |
| 68 | + * |
| 69 | + * @return string |
| 70 | + */ |
| 71 | + function getAttribute($name, $default = null); |
| 72 | + |
| 73 | + /** |
| 74 | + * Set the named attribute |
| 75 | + * |
| 76 | + * @param string $name attribute name |
| 77 | + * @param string $value attribute value |
| 78 | + * |
| 79 | + * @return Page The current Page instance |
| 80 | + */ |
| 81 | + function setAttribute($name, $value); |
| 82 | + |
| 83 | + /** |
| 84 | + * Get the link HTML attributes. |
| 85 | + * |
| 86 | + * @return array |
| 87 | + */ |
| 88 | + function getLinkAttributes(); |
| 89 | + |
| 90 | + /** |
| 91 | + * Set the link HTML attributes as associative array. |
| 92 | + * |
| 93 | + * @param array $linkAttributes |
| 94 | + * |
| 95 | + * @return Page The current Page instance |
| 96 | + */ |
| 97 | + function setLinkAttributes($linkAttributes); |
| 98 | + |
| 99 | + /** |
| 100 | + * Return the children attributes |
| 101 | + * |
| 102 | + * @return array |
| 103 | + */ |
| 104 | + function getChildrenAttributes(); |
| 105 | + |
| 106 | + /** |
| 107 | + * Set the children attributes |
| 108 | + * |
| 109 | + * @param array $attributes |
| 110 | + * |
| 111 | + * @return Page The current Page instance |
| 112 | + */ |
| 113 | + function setChildrenAttributes(array $childrenAttributes); |
| 114 | + |
| 115 | + /** |
| 116 | + * Get the label HTML attributes. |
| 117 | + * |
| 118 | + * @return array |
| 119 | + */ |
| 120 | + function getLabelAttributes(); |
| 121 | + |
| 122 | + /** |
| 123 | + * Set the label HTML attributes as associative array. |
| 124 | + * |
| 125 | + * @param array $labelAttributes |
| 126 | + * |
| 127 | + * @return Page The current Page instance |
| 128 | + */ |
| 129 | + function setLabelAttributes($labelAttributes); |
| 130 | + |
| 131 | +} |
0 commit comments