Initialize the seed data for this model. This only executes when the
model is first created or reset to default.
@return void
355829
public function initSettingsData()
    {
        $config = App::make('config');
        $this->locale = $config->get('app.locale', 'en');
        $this->fallback_locale = $this->getFallbackLocale($this->locale);
        $this->timezone = $config->get('cms.backendTimezone', $config->get('app.timezone'));

        $this->editor_font_size = $config->get('editor.font_size', 12);
        $this->editor_word_wrap = $config->get('editor.word_wrap', 'fluid');
        $this->editor_code_folding = $config->get('editor.code_folding', 'manual');
        $this->editor_tab_size = $config->get('editor.tab_size', 4);
        $this->editor_theme = $config->get('editor.theme', static::DEFAULT_THEME);
        $this->editor_show_invisibles = $config->get('editor.show_invisibles', false);
        $this->editor_highlight_active_line = $config->get('editor.highlight_active_line', true);
        $this->editor_use_hard_tabs = $config->get('editor.use_hard_tabs', false);
        $this->editor_show_gutter = $config->get('editor.show_gutter', true);
        $this->editor_auto_closing = $config->get('editor.auto_closing', false);
        $this->editor_autocompletion = $config->get('editor.editor_autocompletion', 'manual');
        $this->editor_enable_snippets = $config->get('editor.enable_snippets', false);
        $this->editor_display_indent_guides = $config->get('editor.display_indent_guides', false);
        $this->editor_show_print_margin = $config->get('editor.show_print_margin', false);
    }
218863
public function initialize()
    {
        $this->setSource($this->tableName);
        $this->keepSnapshots(true);

        $this->belongsTo('pid', __NAMESPACE__ . '\Route', 'id', array('alias' => 'Route'));
    }
409388
protected function initialisation()
	{
		/** @var Column $col */
		foreach( $this->table_schema as $col)
		{
			// todo virtual field fix

			$name = $col->getName();
			$prefix_name = 't.' . $name;
			$this->columns[] = $prefix_name;
			$this->valid_columns[$name] = $prefix_name;
			if( $this->check_type )
			{
				$this->setType($col->getType(), $name);
			}
		}
	}
1116483
protected function init()
    {
        $this->checkDatabaseFile();

        $this->reader = new Reader(
            $this->getDatabasePath(),
            $this->getLocales()
        );
    }
517442
protected function bootSeeds()
    {
        if (isset($this->dir) and isset($this->seedDirs) and is_array($this->seedDirs)) {
            foreach ($this->seedDirs as $dirPath) {
                $this->publishes([ $this->getDatabasePath($dirPath) => database_path($this->seedsDestinationPath) ], 'seeds');
            }
        }
    }
115715
private function initialise()
    {
        for ($i = 0; $i < $this->size; $i++) {
            for ($j = 0; $j < $this->size; $j++) {
                $this->grid[$i][$j] = null;
            }

            $this->rowsAvailable[] = $i;
            $this->columnsAvailable[] = $i;
        }
    }
243720
public function init()
    {
        $replicators = null;

        $form = $this->getForm();
        if ($form !== null && $form->isSubmitted()) {
            $replicators = $form->getHiddenField(
                $this->getReplicatorFieldName()
            );

            if ($replicators !== null) {
                foreach ($replicators as $replicator) {
                    $this->createClonedWidget($replicator);
                }
            }
        }

        if ($replicators === null) {
            $this->prototype_widget->init();
        }
    }
215971
private function seed()
    {
        foreach ($this->input as $key => $value) {
            if (!$this->call($this->before, $value, $key)) {
                return;
            }

            yield $key => $value;

            if (!$this->call($this->after, $value, $key)) {
                return;
            }
        }
    }
371899
public function initialize()
    {
        // Load data from a file file
        $this->storage->load();
        $data = $this->storage->getContent();

        // Set initial array signature
        $this->arraySignature->setData($data);
        $this->arrayCache->setData($data);

        // Run garbage collection
        $this->gc();
    }
974854
public function seed()
    {
        $this->addLastModel();

        $insertedPKs = [];

        foreach ($this->quantities as $modelClass => $quantity) {
            $attributes = [];
            $pivotRecords = [];
            $translations = [];

            $this->modelPopulators[$modelClass]->setGuessedColumnFormatters(true);

            for ($i = 0; $i < $quantity; $i++) {
                list($createdModel, $pivotTables, $currentPivotRecords, $foreignKeys) =
                    $this->modelPopulators[$modelClass]->getInsertRecords($insertedPKs);

                // If the primary key is not auto incremented, it will be among the inserted attributes.
                if ($primaryKey = $createdModel->getKey()) {
                    $insertedPKs[$modelClass][] = $primaryKey;
                }

                $attributes[] = $createdModel->getAttributes();

                if ($currentPivotRecords) {
                    $pivotRecords[] = $currentPivotRecords;
                }

                if ($createdModel->relationLoaded('translations')) {
                    // We're not gonna use \Illuminate\Support\Collection::toArray(), because the
                    // translation model could have accessors to append to its array form.
                    foreach ($createdModel->translations as $translation) {
                        $translations[$i][] = $translation->getAttributes();
                    }
                }
            }

            // SQL limits how many rows you can insert at once, so we'll chunk the records.
            foreach (array_chunk($attributes, 500) as $chunk) {
                $createdModel->insert($chunk);
            }

            if (!isset($insertedPKs[$modelClass])) {
                $insertedPKs[$modelClass] = $this->getInsertedPKs($createdModel, count($attributes));
            }

            $this->insertPivotRecords(
                $createdModel->getConnection(),
                $pivotTables,
                $pivotRecords,
                $foreignKeys,
                $insertedPKs[$modelClass]
            );

            $this->insertTranslations($createdModel, $translations, $insertedPKs[$modelClass]);
        }

        $this->forgetAddedModels();

        $this->closeDoctrineConnections();

        return $insertedPKs;
    }
625322
protected function initialize()
    {
        if ($this->initialized === true) {
            return;
        }
        $this->initialized = true;
        $this->buildFullConfiguration();
        $this->applyPostprocessing();
    }
627142
public function initialize()
    {
        $this->setSource($this->tableName);
        $this->keepSnapshots(true);

        $this->hasOne('clickable', __NAMESPACE__ . '\Route', 'id', array('alias' => 'Route'));
        $this->hasMany('id', __NAMESPACE__ . '\NavigationRoute', 'navigation_id', array('alias' => 'NavRoute', 'foreignKey' => array('action' => Model\Relation::ACTION_CASCADE)));
    }
523925
public function initialize()
    {
        $this->data = new stdClass();
        $this->data->ownId = null;
        $this->data->orders = [];
    }
1021016
protected function initialize()
    {
        $this->data = new stdClass();
        $this->data->amount = new stdClass();
        $this->data->details = new stdClass();
        $this->data->parentPayments = new stdClass();
    }
1021932
protected function onInit()
    {
        // $this->connection = Util::get($this->params,"connection",null);
        $connectionString = Util::get($this->params, "connectionString", "");
        $username = Util::get($this->params, "username", "");
        $password = Util::get($this->params, "password", "");
        $charset = Util::get($this->params, "charset");
        
        $key = md5($connectionString.$username.$password);
        if (PdoDataSource::$connections==null) {
            PdoDataSource::$connections = array();
        }
        if (isset(PdoDataSource::$connections[$key])) {
            $this->connection = PdoDataSource::$connections[$key];
        } else {
            $this->connection = new PDO($connectionString, $username, $password);
            PdoDataSource::$connections[$key] = $this->connection;
        }
        if ($charset) {
            $this->connection->exec("set names '$charset'");
        }
    }
1096991
protected function initData()
    {
        parent::initData();
        array_walk($this->_data, function (&$indexConfigData, $indexName) {
            $indexConfigData = $this->initIndexConfig($indexName, $indexConfigData);
        });
    }
251761
public function initialize() {
        parent::initialize();

        $this->addClauses([
            self::UNION => 'UNION {flag} (%s)',
            self::USING => 'USING %s'
        ]);

        $this->addKeywords([
            self::AVG_ROW_LENGTH        => 'AVG_ROW_LENGTH',
            self::BIG_RESULT            => 'SQL_BIG_RESULT',
            self::BUFFER_RESULT         => 'SQL_BUFFER_RESULT',
            self::BTREE                 => 'BTREE',
            self::CACHE                 => 'SQL_CACHE',
            self::CONNECTION            => 'CONNECTION',
            self::DATA_DIRECTORY        => 'DATA DIRECTORY',
            self::DEFAULT_CHARACTER_SET => 'DEFAULT CHARACTER SET',
            self::DEFAULT_COMMENT       => 'DEFAULT COMMENT',
            self::DELAYED               => 'DELAYED',
            self::DELAY_KEY_WRITE       => 'DELAY_KEY_WRITE',
            self::DISTINCT_ROW          => 'DISTINCTROW',
            self::FOR_UPDATE_LOCK       => 'FOR UPDATE',
            self::FULLTEXT              => 'FULLTEXT',
            self::HASH                  => 'HASH',
            self::HIGH_PRIORITY         => 'HIGH_PRIORITY',
            self::INDEX_DIRECTORY       => 'INDEX DIRECTORY',
            self::INSERT_METHOD         => 'INSERT_METHOD',
            self::KEY_BLOCK_SIZE        => 'KEY_BLOCK_SIZE',
            self::LOW_PRIORITY          => 'LOW_PRIORITY',
            self::MAX_ROWS              => 'MAX_ROWS',
            self::MIN_ROWS              => 'MIN_ROWS',
            self::NO_CACHE              => 'SQL_NO_CACHE',
            self::PACK_KEYS             => 'PACK_KEYS',
            self::QUICK                 => 'QUICK',
            self::ROW_FORMAT            => 'ROW_FORMAT',
            self::SHARED_LOCK           => 'LOCK IN SHARE MODE',
            self::SMALL_RESULT          => 'SQL_SMALL_RESULT',
            self::SPATIAL               => 'SPATIAL',
            self::STATS_AUTO_RECALC     => 'STATS_AUTO_RECALC',
            self::STATS_PERSISTENT      => 'STATS_PERSISTENT',
            self::UNIQUE                => 'UNIQUE'
        ]);

        $this->addStatements([
            Query::INSERT        => new Statement('INSERT {priority} {ignore} INTO {table} {fields} VALUES {values}'),
            Query::SELECT        => new Statement('SELECT {distinct} {priority} {optimize} {cache} {fields} FROM {table} {joins} {where} {groupBy} {having} {compounds} {orderBy} {limit} {lock}'),
            Query::UPDATE        => new Statement('UPDATE {priority} {ignore} {table} {joins} SET {fields} {where} {orderBy} {limit}'),
            Query::DELETE        => new Statement('DELETE {priority} {quick} {ignore} FROM {table} {joins} {where} {orderBy} {limit}'),
            Query::TRUNCATE      => new Statement('TRUNCATE {table}'),
            Query::CREATE_TABLE  => new Statement("CREATE {temporary} TABLE IF NOT EXISTS {table} (\n{columns}{keys}\n) {options}"),
            Query::CREATE_INDEX  => new Statement('CREATE {type} INDEX {index} ON {table} ({fields}) {using}'),
            Query::DROP_TABLE    => new Statement('DROP {temporary} TABLE IF EXISTS {table}'),
            Query::DROP_INDEX    => new Statement('DROP INDEX {index} ON {table}')
        ]);
    }