@@ -20,6 +20,9 @@ discard block |
||
| 20 | 20 | private $saveCache; |
| 21 | 21 | private $skeletonDir; |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @param string $skeletonDir |
|
| 25 | + */ |
|
| 23 | 26 | public function __construct($skeletonDir, ContainerInterface $container) |
| 24 | 27 | { |
| 25 | 28 | $this->skeletonDir = $skeletonDir; |
@@ -58,6 +61,9 @@ discard block |
||
| 58 | 61 | return array($gridColumnClass, $gridColumnsNamespace, $gridColumnPath, $templatePath); |
| 59 | 62 | } |
| 60 | 63 | |
| 64 | + /** |
|
| 65 | + * @param string $entityDocument |
|
| 66 | + */ |
|
| 61 | 67 | public function generate(BundleInterface $bundle, $entityDocument, $metadata, $columns = false) |
| 62 | 68 | { |
| 63 | 69 | if ($metadata instanceof ClassMetadataInfo) { |
@@ -68,7 +68,6 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | - * @param mixed $bootstrapCss |
|
| 72 | 71 | */ |
| 73 | 72 | public function setThemeCss(array $themeCss) |
| 74 | 73 | { |
@@ -84,7 +83,6 @@ discard block |
||
| 84 | 83 | } |
| 85 | 84 | |
| 86 | 85 | /** |
| 87 | - * @param mixed $bootstrapJs |
|
| 88 | 86 | */ |
| 89 | 87 | public function setThemeJs(array $themeJs) |
| 90 | 88 | { |
@@ -36,6 +36,9 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | protected $annotationSort; |
| 38 | 38 | |
| 39 | + /** |
|
| 40 | + * @param boolean $flag |
|
| 41 | + */ |
|
| 39 | 42 | public function setDebug($flag) |
| 40 | 43 | { |
| 41 | 44 | $this->debug = $flag; |
@@ -6,18 +6,33 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | interface GridSourceInterface |
| 8 | 8 | { |
| 9 | + /** |
|
| 10 | + * @return void |
|
| 11 | + */ |
|
| 9 | 12 | public function setId($id); |
| 10 | 13 | |
| 14 | + /** |
|
| 15 | + * @return string |
|
| 16 | + */ |
|
| 11 | 17 | public function getId(); |
| 12 | 18 | |
| 13 | 19 | public function getCount(); |
| 14 | 20 | |
| 15 | 21 | public function getRecords(); |
| 16 | 22 | |
| 23 | + /** |
|
| 24 | + * @return integer |
|
| 25 | + */ |
|
| 17 | 26 | public function getLimit(); |
| 18 | 27 | |
| 28 | + /** |
|
| 29 | + * @return integer |
|
| 30 | + */ |
|
| 19 | 31 | public function getOffset(); |
| 20 | 32 | |
| 33 | + /** |
|
| 34 | + * @return void |
|
| 35 | + */ |
|
| 21 | 36 | public function getLastModified(); |
| 22 | 37 | |
| 23 | 38 | /** |
@@ -38,8 +53,14 @@ discard block |
||
| 38 | 53 | |
| 39 | 54 | public function getOrderBy(); |
| 40 | 55 | |
| 56 | + /** |
|
| 57 | + * @return void |
|
| 58 | + */ |
|
| 41 | 59 | public function setColumns($columns); |
| 42 | 60 | |
| 61 | + /** |
|
| 62 | + * @return boolean |
|
| 63 | + */ |
|
| 43 | 64 | public function hasIdColumn(); |
| 44 | 65 | |
| 45 | 66 | public function find($id); |
@@ -71,6 +71,9 @@ discard block |
||
| 71 | 71 | return $this->debug; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | + /** |
|
| 75 | + * @param string $id |
|
| 76 | + */ |
|
| 74 | 77 | public function add($id, GridSourceInterface $gridSource) |
| 75 | 78 | { |
| 76 | 79 | $this->extraGridSources[$id] = $gridSource; |
@@ -117,9 +120,8 @@ discard block |
||
| 117 | 120 | /** |
| 118 | 121 | * Get a gridsource. |
| 119 | 122 | * |
| 120 | - * @param string $id Entity or Document |
|
| 121 | - * @param EntityManager|DocumentManager|null $manager (optional) Entity or Document manager to use (overrides default) |
|
| 122 | 123 | * |
| 124 | + * @param string|null $entityOrDocumentNameOrId |
|
| 123 | 125 | * @return GridSourceInterface|null |
| 124 | 126 | * |
| 125 | 127 | * @throws \Exception |
@@ -75,11 +75,17 @@ |
||
| 75 | 75 | return array(substr($entity, 0, $pos), substr($entity, $pos + 1)); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | + /** |
|
| 79 | + * @param string $entity |
|
| 80 | + */ |
|
| 78 | 81 | protected function getEntityMetadata($entity) |
| 79 | 82 | { |
| 80 | 83 | return $this->getContainer()->get('doctrine.orm.default_entity_manager')->getClassMetadata($entity); |
| 81 | 84 | } |
| 82 | 85 | |
| 86 | + /** |
|
| 87 | + * @param string $document |
|
| 88 | + */ |
|
| 83 | 89 | protected function getDocumentMetadata($document) |
| 84 | 90 | { |
| 85 | 91 | return $this->getContainer()->get('doctrine_mongodb.odm.default_document_manager')->getClassMetadata($document); |