Checking for installed page type

Permalink
I'd like to submit a theme to the marketplace and am not sure about this requirement:

If you are adding a new page type, be sure to check that the page type does not exist already before installing:
Loader::model('collection_types');
if(!is_object(CollectionType::getByHandle('home')) {
$data['ctHandle'] = 'home';
$data['ctName'] = t('Home');
$hpt = CollectionType::add($data, $pkg);
}

Where exactly does this code belong?

Thanks!

havedampton
 
Job replied on at Permalink Reply
Job
In your packages controller.php, within the install() function.

Be sure to mark as an answer if it helps.

Job.