Correct way to install theme from package?

Permalink
I'm seeing two different ways to install a theme.
1.) Using PageTheme::add
2.) Using Theme::add

So which is the correct way?

ob7dev
 
mesuva replied on at Permalink Best Answer Reply
mesuva
Theme::add

edit: PageTheme just looks like a class that extends Theme, so programatically it doesn't really make any difference. But I'd still use Theme:add
ob7dev replied on at Permalink Reply
ob7dev
Do we need to check if it already exists before somewhat how we do with block types?
if (!BlockType::getByHandle($blockHandle)) {
                BlockType::installBlockType($blockHandle, $package);
            }