public function mapRelationshipOptions($items, $nameField, $keyField)
    {
        $result = array();

        foreach ($items as $option) {
            $result[] = array(
                'id'   => $option->{$keyField},
                'text' => strval($option->{$nameField}),
            );
        }

        return $result;
    }