common/models/resources/Option.php
public static function findByNameCategoryId( $name, $categoryId ) {

		$optionTable = CoreTables::getTableName( CoreTables::TABLE_OPTION );

		return self::find()->where( "$optionTable.name=:name AND $optionTable.categoryId=:id", [ ':name' => $name, ':id' => $categoryId ] )->one();
	}
public static function findByNameCategoryId( $name, $categoryId ) {

		$optionTable = CoreTables::getTableName( CoreTables::TABLE_OPTION );

		return self::find()->where( "$optionTable.name=:name AND $optionTable.categoryId=:id", [ ':name' => $name, ':id' => $categoryId ] )->one();
	}
public static function findByNameCategoryId ( $ name , $ categoryId ) { $ optionTable = CoreTables :: getTableName ( CoreTables :: TABLE_OPTION ) ; return self :: find ( ) -> where ( "$optionTable.name=:name AND $optionTable.categoryId=:id" , [ ':name' => $ name , ':id' => $ categoryId ] ) -> one ( ) ; }
Return the option using given name and category id.

@param string $name
@param integer $categoryId
@return Option
Return the option using given name and category id .