yii\elasticsearch\BulkCommand::addAction PHP Method

addAction() public method

Adds an action to the command. Will overwrite existing actions if they are specified as a string.
public addAction ( $line1, $line2 = null )
    public function addAction($line1, $line2 = null)
    {
        if (!is_array($this->actions)) {
            $this->actions = [];
        }
        $this->actions[] = $line1;
        if ($line2 !== null) {
            $this->actions[] = $line2;
        }
    }