public static get_sub_field_brick_instance ( ) : fewbricks\brick | ||
Résultat | fewbricks\brick |
public static function get_sub_field_brick_instance()
{
$row_layout = get_row_layout();
$class_name = 'fewbricks\\bricks\\' . self::get_sub_field_brick_class_name();
$instance = new $class_name($row_layout);
/** @noinspection PhpUndefinedMethodInspection */
$instance->set_is_layout(true);
return $instance;
}
/** * @return string */ protected function get_brick_html() { $html = ''; while ($this->have_rows('modules')) { $this->the_row(); $html .= acf_fields\flexible_content::get_sub_field_brick_instance()->get_html(); } return $html; }