/** * */ public function set_fields() { $fc = new acf_fields\flexible_content('Modules', 'modules', '1509111554i'); $l = new layout('', 'l1', '1509111555a'); $l->add_brick(new demo_video('video', '1509111556x')); $fc->add_layout($l); $l = new layout('', 'l2', '1509111557u'); $l->add_brick(new demo_button('button', '1509111556s')); $fc->add_layout($l); $this->add_flexible_content($fc); }
/** * */ public function set_fields() { $fc = new acf_fields\flexible_content('Modules', 'modules', '1509111554i'); $l = new layout('', 'text', '1603250048a'); $l->add_brick(new demo_headline('headline', '1603250048b')); $fc->add_layout($l); $l = new layout('', 'headline', '1603250054a'); $l->add_brick(new demo_text('text', '1603250054b')); $fc->add_layout($l); $l = new layout('', 'button', '1509111557u'); $l->add_brick(new demo_button('button', '1509111556s')); $fc->add_layout($l); $l = new layout('', 'video', '1509111555a'); $l->add_brick(new demo_video('video', '1509111556x')); $fc->add_layout($l); $this->add_flexible_content($fc); }
*/ $fewbricks_fg = new fewacf\field_group('Fewbricks Demo - 2 Columns', '1603242355a', $fewbricks_fg_location, 30); $fewbricks_fg->add_brick((new bricks\demo_flexible_columns('fcol2', '1603242355b'))->set_arg('nr_of_columns', 2)); $fewbricks_fg->register(); /** * Flexible content on the fly. * Showing how it is possible to build complex flexible contents on the fly */ $fewbricks_fg = new fewacf\field_group('Fewbricks Demo - Flexible content on the fly', '1509111453p', $fewbricks_fg_location, 35); $fewbricks_fc = new acf_fields\flexible_content('Flexible content 1', 'fc1', '150901113c'); // Leave name empty of you want it o be set to the same as that of the brick that you add $fewbricks_l = new fewacf\layout('', 'layout_1', '1509042218o'); $fewbricks_l->add_brick((new bricks\demo_video('video', '1509042222u'))->set_arg('no_bg_color', true)); $fewbricks_fc->add_layout($fewbricks_l); $fewbricks_l = new fewacf\layout('', 'layout_2', '1509060002y'); $fewbricks_l->add_brick(new bricks\demo_buttons_list('blist2', '1509060001t')); $fewbricks_fc->add_layout($fewbricks_l); $fewbricks_fg->add_flexible_content($fewbricks_fc); $fewbricks_fg->register(); /** * Buttons list * Check demo_buttons_list to see how to set up repeaters. */ $fewbricks_fg = new fewacf\field_group('Fewbricks Demo - Buttons list', '1509111339o', $fewbricks_fg_location, 40); $fewbricks_fg->add_brick((new bricks\demo_buttons_list('buttons_list', '1509052316o'))->set_field_label_prefix('Button list')); $fewbricks_fg->register(); /** * Standard list * Also showing off repeaters. */ $fewbricks_fg = new fewacf\field_group('Fewbricks Demo - Standard list', '1509111339p', $fewbricks_fg_location, 50);