You are here

public function WeatherCommands::import in Weather 8

Same name and namespace in other branches
  1. 2.0.x src/Commands/WeatherCommands.php \Drupal\weather\Commands\WeatherCommands::import()

Import data from .csv to database and log.

@usage weather-import No args needed.

@command weather:import @aliases weather-i

File

src/Commands/WeatherCommands.php, line 36

Class

WeatherCommands
Drush command to add support to weather module (import weather csv file).

Namespace

Drupal\weather\Commands

Code

public function import() {
  $this
    ->del()
    ->read()
    ->add()
    ->logger()
    ->success(dt('Ok.'));
}