public static function getRootId()
	{
		$result = self::all()
			->whereEquals('parent_id', 0)
			->row();

		if (!$result->get('id'))
		{
			$result = self::all()
				->whereEquals('lft', 0)
				->row();

			if (!$result->get('id'))
			{
				$result = self::all()
					->whereEquals('alias', 'root.1')
					->row();
			}
		}

		return $result->get('id');
	}
public static function getRootId()
	{
		$result = self::all()
			->whereEquals('parent_id', 0)
			->row();

		if (!$result->get('id'))
		{
			$result = self::all()
				->whereEquals('lft', 0)
				->row();

			if (!$result->get('id'))
			{
				$result = self::all()
					->whereEquals('alias', 'root.1')
					->row();
			}
		}

		return $result->get('id');
	}
public static function getRootId ( ) { $ result = self :: all ( ) -> whereEquals ( 'parent_id' , 0 ) -> row ( ) ; if ( ! $ result -> get ( 'id' ) ) { $ result = self :: all ( ) -> whereEquals ( 'lft' , 0 ) -> row ( ) ; if ( ! $ result -> get ( 'id' ) ) { $ result = self :: all ( ) -> whereEquals ( 'alias' , 'root.1' ) -> row ( ) ; } } return $ result -> get ( 'id' ) ; }
Method to load root node ID

@return  integer
Method to load root node ID