Xpressengine\DynamicField\AbstractType::parseWhere PHP Method

parseWhere() private method

update, delete 처리 시 전달되는 wheres 에서 id를 추출 한다.
private parseWhere ( array $wheres ) : array
$wheres array \Illuminate\Database\Query\Builder's wheres attribute
return array
    private function parseWhere(array $wheres)
    {
        $where = [];
        foreach ($wheres as $arr) {
            // check alias
            $columnInfo = explode('.', $arr['column']);
            if (count($columnInfo) === 1) {
                $column = $columnInfo[0];
            } else {
                $column = $columnInfo[1];
            }
            if ($column == 'id' && $arr['operator'] == '=') {
                $where['id'] = $arr['value'];
            }
        }
        return $where;
    }