| @@ 80-88 (lines=9) @@ | ||
| 77 | * |
|
| 78 | * @return string Generated output |
|
| 79 | */ |
|
| 80 | public function copyAction() |
|
| 81 | { |
|
| 82 | if( config( 'shop.authorize', true ) ) { |
|
| 83 | $this->authorize( 'admin', [['admin', 'editor']] ); |
|
| 84 | } |
|
| 85 | ||
| 86 | $cntl = $this->createClient(); |
|
| 87 | return $this->getHtml( $cntl->copy() ); |
|
| 88 | } |
|
| 89 | ||
| 90 | ||
| 91 | /** |
|
| @@ 96-104 (lines=9) @@ | ||
| 93 | * |
|
| 94 | * @return string Generated output |
|
| 95 | */ |
|
| 96 | public function createAction() |
|
| 97 | { |
|
| 98 | if( config( 'shop.authorize', true ) ) { |
|
| 99 | $this->authorize( 'admin', [['admin', 'editor']] ); |
|
| 100 | } |
|
| 101 | ||
| 102 | $cntl = $this->createClient(); |
|
| 103 | return $this->getHtml( $cntl->create() ); |
|
| 104 | } |
|
| 105 | ||
| 106 | ||
| 107 | /** |
|
| @@ 112-120 (lines=9) @@ | ||
| 109 | * |
|
| 110 | * @return string Generated output |
|
| 111 | */ |
|
| 112 | public function deleteAction() |
|
| 113 | { |
|
| 114 | if( config( 'shop.authorize', true ) ) { |
|
| 115 | $this->authorize( 'admin', [['admin', 'editor']] ); |
|
| 116 | } |
|
| 117 | ||
| 118 | $cntl = $this->createClient(); |
|
| 119 | return $this->getHtml( $cntl->delete() . $cntl->search() ); |
|
| 120 | } |
|
| 121 | ||
| 122 | ||
| 123 | /** |
|
| @@ 128-136 (lines=9) @@ | ||
| 125 | * |
|
| 126 | * @return string Generated output |
|
| 127 | */ |
|
| 128 | public function getAction() |
|
| 129 | { |
|
| 130 | if( config( 'shop.authorize', true ) ) { |
|
| 131 | $this->authorize( 'admin', [['admin', 'editor']] ); |
|
| 132 | } |
|
| 133 | ||
| 134 | $cntl = $this->createClient(); |
|
| 135 | return $this->getHtml( $cntl->get() ); |
|
| 136 | } |
|
| 137 | ||
| 138 | ||
| 139 | /** |
|
| @@ 144-152 (lines=9) @@ | ||
| 141 | * |
|
| 142 | * @return string Generated output |
|
| 143 | */ |
|
| 144 | public function saveAction() |
|
| 145 | { |
|
| 146 | if( config( 'shop.authorize', true ) ) { |
|
| 147 | $this->authorize( 'admin', [['admin', 'editor']] ); |
|
| 148 | } |
|
| 149 | ||
| 150 | $cntl = $this->createClient(); |
|
| 151 | return $this->getHtml( ( $cntl->save() ? : $cntl->search() ) ); |
|
| 152 | } |
|
| 153 | ||
| 154 | ||
| 155 | /** |
|
| @@ 160-168 (lines=9) @@ | ||
| 157 | * |
|
| 158 | * @return string Generated output |
|
| 159 | */ |
|
| 160 | public function searchAction() |
|
| 161 | { |
|
| 162 | if( config( 'shop.authorize', true ) ) { |
|
| 163 | $this->authorize( 'admin', [['admin', 'editor']] ); |
|
| 164 | } |
|
| 165 | ||
| 166 | $cntl = $this->createClient(); |
|
| 167 | return $this->getHtml( $cntl->search() ); |
|
| 168 | } |
|
| 169 | ||
| 170 | ||
| 171 | /** |
|