NAME Tags::HTML::Image::Grid - Tags helper for image grid. SYNOPSIS use Tags::HTML::Image::Grid; my $obj = Tags::HTML::Image::Grid->new(%params); $obj->process($images_ar); $obj->process_css; METHODS "new" my $obj = Tags::HTML::Image::Grid->new(%params); Constructor. * "css" 'CSS::Struct::Output' object for process_css processing. Default value is undef. * "css_image_grid" Form CSS style. Default value is 'image-grid'. * "img_border_color_cb" Image border callback. This is used with 'img_border_width' parameter. Border will be present only for image which has color defined. Callback arguments are: $self and $image object. Default value is undef. * "img_border_width" Image border width if need to use. Default value is undef. * "img_link_cb" Image link callback. Default value is undef. * "img_select_cb" Image select callback. Default value is undef. * "img_src_cb" Image src callback across data object. Default value is undef. * "img_width" Image width in pixels. Default value is 340. * "tags" 'Tags::Output' object. Default value is undef. * "title" Image grid title. Default value is undef. "process" $obj->process($images_ar); Process Tags structure for images in $images_ar to output. Accepted items in $images_ar reference to array are Data::Image objects. Returns undef. "process_css" $obj->process_css; Process CSS::Struct structure for output. Returns undef. ERRORS new(): From Class::Utils::set_params(): Unknown parameter '%s'. From Tags::HTML::new(): Parameter 'css' must be a 'CSS::Struct::Output::*' class. Parameter 'tags' must be a 'Tags::Output::*' class. Parameter 'img_link_cb' must be a code. Parameter 'img_select_cb' must be a code. Parameter 'img_src_cb' must be a code. process(): From Tags::HTML::process(): Parameter 'tags' isn't defined. Bad data image object. process_css(): From Tags::HTML::process_css(): Parameter 'css' isn't defined. EXAMPLE use strict; use warnings; use CSS::Struct::Output::Indent; use Data::Image; use Tags::HTML::Image::Grid; use Tags::Output::Indent; # Object. my $css = CSS::Struct::Output::Indent->new; my $tags = Tags::Output::Indent->new; my $obj = Tags::HTML::Image::Grid->new( 'css' => $css, 'tags' => $tags, ); # Images. my $image1 = Data::Image->new( 'comment' => 'Michal from Czechia', 'url' => 'https://upload.wikimedia.org/wikipedia/commons/a/a4/Michal_from_Czechia.jpg', ); my $image2 = Data::Image->new( 'comment' => 'Self photo', 'url' => 'https://upload.wikimedia.org/wikipedia/commons/7/76/Michal_Josef_%C5%A0pa%C4%8Dek_-_self_photo_3.jpg', ); # Process image grid. $obj->process([$image1, $image2]); $obj->process_css; # Print out. print $tags->flush; print "\n\n"; print $css->flush; # Output: #