This functionality in particular allows user to search a specific wish list with a purpose to access/modify it. The user can then alter/modify the specific wishlist according as per personal requirements.

Implementation steps involved:

  1. This functionality makes use of the Form and Search APIs to include the following components for executing a functional and effective search:
    • Search submit button: To execute the required search.
    • Search results list: Displaying the expected search results.
    • Search text box (textbox): If there are keywords, check for the user, wish list title, or address matches.
  2. Additionally, the Database API would involve the following facets:
    • $db = \Drupal::database()​: Gets the connection object for the specified database key and target.
    • $query->condition(db_or()
      ->condition('u.name','%'.$keywords.'%','LIKE')
      ->condition('w.title','%'.$keywords.'%','LIKE')
      ->condition('w.address','%'.$keywords.'%',
      'LIKE'))​
      ​ :
      makes three queries and returns a new DatabaseCondition.
    • $data=$db→select('uc_wishlist','wid')→fields('wid')→execute()​: Checks if wish list is not private.
  3. The ​Configuration API would be used to configure the fields.

Comments

chiranjeeb2410 created an issue. See original summary.

chiranjeeb2410’s picture

Issue summary: View changes
naveenvalecha’s picture

Project: Uc Wishlist » UC Wish List
Version: » 8.x-1.x-dev
chiranjeeb2410’s picture

Title: Enable 'Search Wishlist' functionality: » Enable 'Search Wishlist' functionality
naveenvalecha’s picture