Create new seed class.

@access 	protected
@return 	<void>
199617
protected function createSeed()
	{
		$templateTags = [];
		$seedsDirectory = $this->cmd->getConfigOpt('seeds_storage');

		$filename = trim($this->cmd->question('Seed filename?'));
		$templateTags['phx:class'] = Helper::getQualifiedClassName($filename);

		$path = $seedsDirectory . '/' . $filename . '.php';

		if (file_exists($path)) {
			throw new SeedFileInvalidException(
				sprintf(
					'Seed file [%s] exists.',
					$filename
				)
			);
		}

		$builder = new TemplateBuilder($this->cmd, $this->env);
		$builder->createClassTemplate('seed', $filename, $seedsDirectory, $templateTags);
	}
829878
public function actionCreate()
    {
        $data = [
            'f1' => $this->getContext()->getInput()->post('p1'),
            'f2' => $this->getContext()->getInput()->post('p2'),
        ];

        $this->outputJson($data);
        //$this->outputJson(null, 'shibaile', 403);
    }
940111
static public function create()
    {

        if (self::$displayErrors) {
            $flags = E_ALL;
            ini_set('display_errors', 1);
        } else {
            $flags = 0;
            ini_set('display_errors', 0);
        }

        set_error_handler(array('\psDebug\Debug', "errorHandler"), $flags);
        set_exception_handler(array('\psDebug\Debug', "exceptionHandler"));

    }
699078
public function create()
	{
		// The highlight select field
		if ($this->canChangeHighlight)
		{
			$this->generateDCA('highlight', array
			(
				'inputType'			=> 'select',
				'label'				=> &$GLOBALS['TL_LANG']['tl_content']['highlight'],
				'options'			=> array('HTML', 'HTML5', 'XML', 'JavaScript', 'CSS', 'SCSS', 'PHP', 'JSON', 'Markdown'),
				'eval'				=> array
				(
					'includeBlankOption'	=> true,
					'submitOnChange'		=> true,
					'tl_class'				=> 'w50 clr'
				),
			));		
		}

		// The code text area
		$this->generateDCA('text', array
		(
			'inputType' 	=>	'textarea',
			'label'			=>	array($this->label, $this->description),
			'eval'			=>	array
			(
				'mandatory'		=>	($this->mandatory) ? true : false, 
				'tl_class'		=> 	'clr',
				'rte'			=>	'ace|' . (($this->highlight) ? strtolower($this->highlight) : 'text'),
				'preserveTags'	=>	true,
			),
			'load_callback'		=> (!$this->canChangeHighlight) ?: array
			(
				array('tl_content_elements', 'setAceCodeHighlighting'),
			),
		));
	}
651761
public function create()
    {
        if (! $this->adapter->fileExists($this->path, true)) {
            // ensure the parent directory exists
            new Directory(dirname($this->path), $this->adapter);

            if ($this->adapter->createFile($this->path) === false) {
                $this->throwUnableToCreate();
            }
        }

        return $this;
    }
384108
public function createInstance()
    {
        $classname = $this->getPlatformClassname();

        if (!class_exists($classname)) {
            throw new \Exception(
                sprintf('Unable to locate class %s', $classname)
            );
        }

        return new $classname();
    }
112717
public function create()
	{
		// Set some options
		switch ($this->source)
		{
			case 'image':
				$extensions = \Config::get('validImageTypes');
				$orderField = $this->virtualFieldName('orderSRC');
				$isGallery = true;
				$isDownloads = false;
				break;
				
			case 'video':
				$extensions = \Config::get('validVideoTypes');
				$orderField = false;
				$isGallery = false;
				$isDownloads = true;
				break;
				
			case 'audio':
				$extensions = \Config::get('validAudioTypes');
				$orderField = false;
				$isGallery = false;
				$isDownloads = true;
				break;
				
			case 'custom':
				$extensions = $this->customExtension;
				$orderField = $this->virtualFieldName('orderSRC');
				$isGallery = false;
				$isDownloads = ($this->canSelectFolder) ? true : false;
				break;
				
			default:
				$extensions = \Config::get('allowedDownload');
				$orderField = $this->virtualFieldName('orderSRC');
				$isGallery = false;
				$isDownloads = true;
				break;				
		}

		if ($this->multiSource)
		{

			// The multiSRC field
			$this->generateDCA('multiSRC', array
			(
				'inputType' =>	'fileTree',
				'label'		=>	array($this->label, $this->description),
				'eval'     	=> 	array
				(
					'multiple'		=>	true,				
					'fieldType'		=>	'checkbox', 
					'orderField'	=>	$orderField,
					'files'			=>	true,
					'filesOnly'		=>	!$this->canSelectFolder,
					'extensions' 	=>	$extensions,
					'isGallery'		=>	$isGallery,
					'isDownloads'	=>	$isDownloads,
					'mandatory'		=>	($this->mandatory) ? true : false, 
					'tl_class'		=>	'clr',
				),
				'load_callback'		=> (!$orderField) ?: array
				(
					array('tl_content_elements', 'prepareOrderValue'),
				),
				'save_callback'		=> (!$orderField) ?: array
				(
					array('tl_content_elements', 'saveOrderValue'),
				),
			));

			// The orderSRC field
			if ($orderField)
			{
				$this->generateDCA('orderSRC', array(), false, false);
			}
		}
		else
		{
			// the singleSRC field
			$this->generateDCA('singleSRC', array
			(
				'inputType' =>	'fileTree',
				'label'		=>	array($this->label, $this->description),
				'eval'     	=> 	array
				(
					'fieldType'		=>	'radio', 
					'files'			=>	true, 
					'extensions' 	=>	$extensions,
					'mandatory'		=>	($this->mandatory) ? true : false, 
					'tl_class'		=>	'clr',
				),
			));
			
		}
		
		// The size field
		if ($this->source == 'image' && $this->canChangeSize)
		{
			$this->generateDCA('size', array
			(
				'inputType'			=> 'imageSize',
				'label'				=> &$GLOBALS['TL_LANG']['tl_content']['size'],
				'options'			=> $this->getImageSizeList(),
				'default'			=> $this->size,
				'reference'			=> &$GLOBALS['TL_LANG']['MSC'],
				'eval' =>	array
				(
					'rgxp' =>' natural', 
					'includeBlankOption' => false, 
					'nospace' => true, 
					'tl_class' => 'w50',
				),
				'load_callback'	=>	array
				(
					array('tl_content_elements','defaultValue')
				),
			));	
		}

		// The sortBy field
		if ($this->multiSource && $this->canChangeSortBy)
		{
			$this->generateDCA('sortBy', array
			(
				'inputType'               => 'select',
				'label'                   => &$GLOBALS['TL_LANG']['tl_content']['sortBy'],
				'options'                 => array('custom', 'name_asc', 'name_desc', 'date_asc', 'date_desc', 'random'),
				'reference'               => &$GLOBALS['TL_LANG']['tl_content'],
				'eval'                    => array
				(
					'tl_class'=>'w50'
				),
			));		
		}
	}
814194
public function run()
    {
        $this->seedLessons();
        $this->seedDays();
        $this->seedShifts();
        $this->seedTimeslots();
        $this->seedAttendancesType();
        $this->seedAttendances();
    }
972379
public function seed(array $seeds)
    {
        foreach ($seeds as $seed) {
            /** @var  \Arcanesoft\Auth\Models\PermissionsGroup  $group */
            $group       = PermissionsGroup::create($seed['group']);
            $permissions = array_map(function ($permission) {
                return new Permission($permission);
            }, $seed['permissions']);

            $group->permissions()->saveMany($permissions);
        }
    }
1329664
protected function create()
    {
        $this->setReleaseVersion();

        $output = $this->getDestination() . '/' . $this->getFilename();

        $phar = new Phar($output, FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::KEY_AS_FILENAME);
        $phar->buildFromDirectory(Context::getParam('project-root'), $this->options['excluded-paths']);
        $phar->setMetadata(array_merge(array('version' => $this->releaseVersion), $this->options['metadata']));
        $phar->setDefaultStub($this->options['default-stub-cli'], $this->options['default-stub-web']);

        return $output;
    }
142301
public function create()
	{
	    if(!$this->isFile($this->getName())){
            $this->createPath($this->path);
            $file = fopen($this->getName(), "w");
            fclose($file);
        }
	}
798338
protected function registerSeedGenerator()
	{
		$this->app['generate.seed'] = $this->app->share(function($app)
		{
			$cache = new Cache($app['files']);
			$generator = new Generators\SeedGenerator($app['files'], $cache);

			return new Commands\SeedGeneratorCommand($generator);
		});
	}
608976
public function actionCreate()
    {
        $stdout = '';
        foreach ($this->db->schema->getTableSchemas() as $table) {
            if ($table->name === $this->migrationTable) {
                continue;
            }
            $stdout .= static::generateCreateTable($table->name).
                static::generateColumns($table->columns, $this->db->schema->findUniqueIndexes($table)).
                static::generatePrimaryKey($table->primaryKey, $table->columns).
                static::generateTableOptions();
        }
        foreach ($this->db->schema->getTableSchemas() as $table) {
            $stdout .= $this->generateForeignKey($table);
        }
        $this->stdout($stdout);
    }
770379
public static function initialize()
    {
        $manager = self::$manager = new self();
        $manager->seedHandlerStack();

        session_set_save_handler($manager);

        return $manager;
    }
701406
public function create() {
        if ($this->overrideAction('create')) {
            return;
        }

        $this->AdminToolbar->setBelongsToData($this->Model);
        $this->AdminToolbar->setHabtmData($this->Model);

        if ($this->request->is('post')) {
            $data = $this->AdminToolbar->getRequestData();
            $this->Model->create();

            if ($this->Model->saveAll($data, array('validate' => 'first', 'atomic' => true, 'deep' => true))) {
                $this->Model->set($data);
                $this->AdminToolbar->logAction(ActionLog::CREATE, $this->Model, $this->Model->id);

                $this->AdminToolbar->setFlashMessage(__d('admin', 'Successfully created a new %s', mb_strtolower($this->Model->singularName)));
                $this->AdminToolbar->redirectAfter($this->Model);

            } else {
                $this->AdminToolbar->setFlashMessage(__d('admin', 'Failed to create a new %s', mb_strtolower($this->Model->singularName)), 'is-error');
            }
        }

        $this->overrideView('create');
    }
814386
public function seedDatabase(): void
    {
        (new SeedSiteSettingTable())->run();
        (new SeedUserTable())->run();
        (new SeedGedcomTable())->run();
        (new SeedGedcomSettingTable())->run();
        (new SeedDefaultResnTable())->run();
    }
371456
public function createInstance()
    {
        switch ($this->method) {
            case 'addBigIntegerColumn':
            case 'addBinaryColumn':
            case 'addBooleanColumn':
            case 'addDateColumn':
            case 'addDateTimeColumn':
            case 'addDecimalColumn':
            case 'addFloatColumn':
            case 'addIntegerColumn':
            case 'addSmallIntegerColumn':
            case 'addStringColumn':
            case 'addTextColumn':
            case 'addTimeColumn':
                $namespace = 'Rentgen\\Database\\Column\\';
                $class = $namespace . ltrim($this->method, 'add');
                $options = isset($this->params[1]) ? $this->params[1] : array();

                if ('addStringColumn' === $this->method && !isset($options['limit'])) {
                    $options['limit'] = 255;
                }
                $column = new $class($this->params[0], $options);
                break;
            case 'addCustomColumn':
                $options = isset($this->params[2]) ? $this->params[2] : [];
                $column = new CustomColumn($this->params[0], $this->params[1], $options);
                break;
            default:
                throw new \Exception(sprintf("Unsupported method " . $this->method));
        }

        if (isset($options['comment'])) {
            $column->setDescription($options['comment']);
        }

        return $column;
    }