getFieldByName('name')->setRequired(TRUE); } /** * @param string $entity * @param string $action * * @return bool */ public function applies($entity, $action) { return strpos($entity, 'Mapping') === 0 && $action === 'create'; } }