iaPlan::getById PHP Method

getById() public method

Return plan information
public getById ( integer $planId ) : null | array
$planId integer plan id
return null | array
    public function getById($planId)
    {
        $plan = null;
        if (!is_array($planId)) {
            $plan = $this->iaDb->row_bind(iaDb::ALL_COLUMNS_SELECTION, '`status` = :status AND `id` = :id', array('status' => iaCore::STATUS_ACTIVE, 'id' => (int) $planId), self::getTable());
            if ($plan) {
                $plan['title'] = iaLanguage::get('plan_title_' . $plan['id']);
                $plan['description'] = iaLanguage::get('plan_description_' . $plan['id']);
            }
        }
        return $plan;
    }