@@ -42,7 +42,7 @@ |
||
| 42 | 42 | throw new \Exception('Attribute Field Type cannot be empty or undefined.'); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - return call_user_func_array([$this->createAttribute($field['type'], $action, $attribute, $field, $model, $modelManager), camel_case('render_'.$action)], []); |
|
| 45 | + return call_user_func_array([$this->createAttribute($field['type'], $action, $attribute, $field, $model, $modelManager), camel_case('render_' . $action)], []); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function render($view = false) |
| 76 | 76 | { |
| 77 | - if (method_exists($this, $method = 'render'.ucfirst($view))) { |
|
| 77 | + if (method_exists($this, $method = 'render' . ucfirst($view))) { |
|
| 78 | 78 | return new HtmlString( |
| 79 | 79 | call_user_func_array([$this, $method], []) |
| 80 | 80 | ); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function renderAdd() |
| 90 | 90 | { |
| 91 | - return view($this->viewpath.'.add', $this->viewData()); |
|
| 91 | + return view($this->viewpath . '.add', $this->viewData()); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | public function renderEdit() |
| 100 | 100 | { |
| 101 | - return view($this->viewpath.'.edit', $this->viewData()); |
|
| 101 | + return view($this->viewpath . '.edit', $this->viewData()); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -108,11 +108,11 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function renderClone() |
| 110 | 110 | { |
| 111 | - if (view()->exists($this->viewpath.'.clone')) { |
|
| 112 | - view($this->viewpath.'.clone', $this->viewData()); |
|
| 111 | + if (view()->exists($this->viewpath . '.clone')) { |
|
| 112 | + view($this->viewpath . '.clone', $this->viewData()); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - return view($this->viewpath.'.edit', $this->viewData()); |
|
| 115 | + return view($this->viewpath . '.edit', $this->viewData()); |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | public function renderView() |
| 124 | 124 | { |
| 125 | - return view($this->viewpath.'.view', $this->viewData()); |
|
| 125 | + return view($this->viewpath . '.view', $this->viewData()); |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | /** |
@@ -152,10 +152,10 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | public function getFieldOptions() |
| 154 | 154 | { |
| 155 | - if (method_exists($this->getModelManager(), $method = camel_case('get_'.$this->getAttribute().'_options'))) { |
|
| 155 | + if (method_exists($this->getModelManager(), $method = camel_case('get_' . $this->getAttribute() . '_options'))) { |
|
| 156 | 156 | // First check for a method of options based on getAttributeNameOptions() |
| 157 | 157 | $this->field['options'] = $this->getModelManager()->$method(); |
| 158 | - } elseif (isset($this->field['options']) && is_string($this->field['options']) && method_exists($this->getModelManager(), $method = camel_case('get_'.$this->field['options'].'_options'))) { |
|
| 158 | + } elseif (isset($this->field['options']) && is_string($this->field['options']) && method_exists($this->getModelManager(), $method = camel_case('get_' . $this->field['options'] . '_options'))) { |
|
| 159 | 159 | // Check if Options is a string and if so, check for a method |
| 160 | 160 | // of options based on getDefinedOptions() |
| 161 | 161 | $this->field['options'] = $this->getModelManager()->$method(); |