Automattic\WooCommerce\Admin\Features\OnboardingTasks
TaskList::__construct()
Constructor
Метод класса: TaskList{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$TaskList = new TaskList(); $TaskList->__construct( $data );
- $data(массив)
- Task list data.
По умолчанию: array()
Код TaskList::__construct() TaskList:: construct WC 9.3.3
public function __construct( $data = array() ) { $defaults = array( 'id' => null, 'hidden_id' => null, 'title' => '', 'tasks' => array(), 'sort_by' => array(), 'event_prefix' => null, 'options' => array(), 'visible' => true, 'display_progress_header' => false, ); $data = wp_parse_args( $data, $defaults ); $this->id = $data['id']; $this->hidden_id = $data['hidden_id']; $this->title = $data['title']; $this->sort_by = $data['sort_by']; $this->event_prefix = $data['event_prefix']; $this->options = $data['options']; $this->visible = $data['visible']; $this->display_progress_header = $data['display_progress_header']; foreach ( $data['tasks'] as $task_name ) { $class = 'Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\\' . $task_name; $task = new $class( $this ); $this->add_task( $task ); } $this->possibly_remove_reminder_bar(); }