common/models/resources/Category.php
public static function findByParentId( $parentId, $config = [] ) {

		$limit 		= $config['limit'] ?? null;
		return self::find()->where( 'parentId=:id', [ ':id' => $parentId ] )->limit($limit)->all();
	}
public static function findByParentId( $parentId, $config = [] ) {

		$limit 		= $config['limit'] ?? null;
		return self::find()->where( 'parentId=:id', [ ':id' => $parentId ] )->limit($limit)->all();
	}
public static function findByParentId ( $ parentId , $ config = [ ] ) { $ limit = $ config [ 'limit' ] ?? null ; return self :: find ( ) -> where ( 'parentId=:id' , [ ':id' => $ parentId ] ) -> limit ( $ limit ) -> all ( ) ; }
Find and return the categories having given parent id.

@param string $parentId
@param array $config
@return Category[]
Find and return the categories having given parent id .