public function format($mask, Entry $entry)
    {
        return $this->formatter->format($mask, function ($key) use ($entry) {
            if ($key === 'id') {
                return $entry->getID();
            }
            
            $attribute = $entry->getAttribute($key);
            if ($attribute) {
                return $attribute;
            }

            $association = $entry->getAssociation($key);
            if (is_object($association)) {
                return $association->getSelectedEntry()->getLabel();
            }
        });
    }