11 private static function checkButtonText($value) : bool
13 return array_key_exists(
'cta_button_text',$value) && in_array($value[
'cta_button_text'],[
14 static::BUTTON_TEXT_BOOK,
17 private static function checkSeeAllText($value) : bool
19 return array_key_exists(
'see_all_text',$value) && in_array($value[
'see_all_text'],[
24 private static function checkUrl($value) : bool
26 return array_key_exists(
'see_all_url',$value) &&
27 is_string($value[
'see_all_url']) &&
28 preg_match(static::URL_PATTERN,$value[
'see_all_url']);
33 return static::checkButtonText($value) && static::checkSeeAllText($value) && static::checkUrl($value);
38 $value[
'see_all_text'] = static::SEE_ALL_TEXT;
39 $value[
'cta_button_text'] = static::BUTTON_TEXT_BOOK;
61 return array_merge(parent::getFields(),[
'cta_button_text',
'see_all_text',
'see_all_url']);