@@ 433-466 (lines=34) @@ | ||
430 | * |
|
431 | * @return $this |
|
432 | */ |
|
433 | public function replaceCheckbox(){ |
|
434 | ||
435 | $method = File::get($this->stubsDirectory . '/Controller/ControllerCheckbox.php'); |
|
436 | $key = false; |
|
437 | ||
438 | $method = str_replace('{{class_name_lw}}', $this->modelData->tableName, $method); |
|
439 | $method = str_replace('{{class_name}}', ucwords($this->modelData->tableName), $method); |
|
440 | $method = str_replace('{{model_name}}', $this->modelData->modelName, $method); |
|
441 | $this->stub = str_replace('{{checkbox}}', $method, $this->stub); |
|
442 | ||
443 | /*foreach ($this->modelData->fields as $field) |
|
444 | { |
|
445 | if ($field->type->ui == "checkbox") { |
|
446 | ||
447 | $method = str_replace('{{class_name_lw}}', $this->modelData->tableName, $method); |
|
448 | $method = str_replace('{{class_name}}', ucwords($this->modelData->tableName), $method); |
|
449 | ||
450 | $this->stub = str_replace('{{checkbox}}', $method, $this->stub); |
|
451 | ||
452 | ||
453 | ||
454 | $key = true; |
|
455 | } |
|
456 | } |
|
457 | ||
458 | if(!$key) |
|
459 | { |
|
460 | $this->stub = str_replace('{{checkbox}}', ' ', $this->stub); |
|
461 | }*/ |
|
462 | ||
463 | ||
464 | return $this; |
|
465 | ||
466 | } |
|
467 | ||
468 | ||
469 | /** |
@@ 628-640 (lines=13) @@ | ||
625 | * |
|
626 | * @return $this |
|
627 | */ |
|
628 | public function replaceCheckbox(){ |
|
629 | ||
630 | $method = File::get($this->stubsDirectory . '/Model/ModelCheckbox.php'); |
|
631 | $key = false; |
|
632 | ||
633 | $method = str_replace('{{class_name_lw}}', $this->modelData->tableName, $method); |
|
634 | $method = str_replace('{{class_name}}', ucwords($this->modelData->tableName), $method); |
|
635 | $method = str_replace('{{model_name}}', $this->modelData->modelName, $method); |
|
636 | $this->stub = str_replace('{{checkbox}}', $method, $this->stub); |
|
637 | ||
638 | return $this; |
|
639 | ||
640 | } |
|
641 | ||
642 | ||
643 | /** |