Yoast\WP\SEO\Task_List\Domain\Components
Call_To_Action_Entry::__construct
The constructor.
Метод класса: Call_To_Action_Entry{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Call_To_Action_Entry = new Call_To_Action_Entry(); $Call_To_Action_Entry->__construct( $label, $type, ?string $href );
- $label(строка) (обязательный)
- The label of the content type entry.
- $type(строка) (обязательный)
- The type of the content type entry.
- ?string $href
- .
По умолчанию:null
Код Call_To_Action_Entry::__construct() Call To Action Entry:: construct Yoast 28.7
public function __construct(
string $label,
string $type,
?string $href = null
) {
if ( ! \in_array( $type, self::ALLOWED_TYPES, true ) ) {
throw new InvalidArgumentException( 'Invalid type for call to action' );
}
$this->label = $label;
$this->type = $type;
$this->href = $href;
}