InfyOm\Generator\Common\CommandData::getOption PHP Method

getOption() public method

public getOption ( $option )
    public function getOption($option)
    {
        return $this->config->getOption($option);
    }

Usage Example

 private function fillSoftDeletes($templateData)
 {
     if (!$this->commandData->getOption('softDelete')) {
         $templateData = str_replace('$SOFT_DELETE_IMPORT$', '', $templateData);
         $templateData = str_replace('$SOFT_DELETE$', '', $templateData);
         $templateData = str_replace('$SOFT_DELETE_DATES$', '', $templateData);
     } else {
         $templateData = str_replace('$SOFT_DELETE_IMPORT$', "use Illuminate\\Database\\Eloquent\\SoftDeletes;\n", $templateData);
         $templateData = str_replace('$SOFT_DELETE$', "use SoftDeletes;\n", $templateData);
         $templateData = str_replace('$SOFT_DELETE_DATES$', "\n\tprotected \$dates = ['deleted_at'];\n", $templateData);
     }
     return $templateData;
 }
All Usage Examples Of InfyOm\Generator\Common\CommandData::getOption