Next 2.4 Creating component classes (cont.) Prev
package Podius::Component::User;

use base 'Podius::Component::Publishable';

sub get_own_property_types {
	return [
		[ user_name        => 'Scalar' ],
		[ password         => 'Password' ],
		[ first_name       => 'Scalar' ],
		[ middle_name      => 'Scalar' ],
		[ last_name        => 'Scalar' ],
		[ email            => 'Scalar' ],
		[ phone            => 'Scalar' ],
		[ cellular         => 'Scalar' ],
		[ fax              => 'Scalar' ],
		[ addresses        => 'ComponentCollection', 'Address' ],
		[ shipping_address => 'VComponent', 'Address' ],
		[ billing_address  => 'VComponent', 'Address' ],
		[ billing_info     => 'ComponentCollection', 'BillingInfo' ],
		[ order_details    => 'ScalarTable', [ 'Product name', 'Color', 'Flavors', 'Quant', 'Price' ] ],
		[ affiliate_id     => 'Integer' ],
		[ is_validated     => 'Boolean' ],
	];
}

1;

more component classes...

Next Content Management with Podius Prev