formId = !empty($array['formId']) ? (int)$array['formId'] : null; $self->blockId = !empty($array['blockId']) ? (string)$array['blockId'] : null; $self->formFormat = !empty($array['formFormat']) ? (string)$array['formFormat'] : null; $self->openFormButton = !empty($array['openFormButton']) ? (string)$array['openFormButton'] : __('Donate now', 'give'); return $self; } /** * @since 3.0.0 */ public function toArray(): array { return get_object_vars($this); } }