fewbricks\bricks\brick::__construct PHP Method

__construct() public method

public __construct ( string $name, string $key = '' )
$name string Name to use when fetching data for the brick
$key string This value must be unique system wide. See the readme-file for tips on how to achieve this. Note that it only needs to be set when registering the brick to a field group, layout etc. No need to pass it when called from the frontend to print the brick.
    public function __construct($name, $key = '')
    {
        $this->name = $name;
        $this->key = $key;
        $this->is_layout = false;
        $this->is_sub_field = false;
        $this->is_option = false;
        $this->fields = [];
        $this->field_label_prefix = '';
        $this->field_label_suffix = '';
        $this->post_id_to_get_field_from = false;
        $this->args = [];
        $this->data = [];
        $this->layouts = [];
        $this->fields_to_remove = [];
        $this->is_sub_brick = false;
        $this->brick_layouts = [];
        $this->inline_css = '';
        $this->inline_css_groups = [];
        // Old code that could cause trouble if removed now since people may be using it.
        // Use set_data_item / get_data_item instead.
        $this->args['brick_css_class'] = [];
    }