Loading README.txt +28 −0 Changes for README.txt: 28 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,9 +2,37 @@ BASIC USAGE --------------- 1. Enable this module, as usual. 2. Go to /admin/structure/auctioneer. All settings are grouped here. 3. Go to /admin/structure/auctioneer/settings/bid_type and add a new Bid type. 4. Go to /admin/structure/auctioneer/settings/auction_type and add a new Auction type. Pick the bid type you created at previous step. 5. Now, go to /admin/structure/auctioneer/auctions and add a new auction of the type you've just created. AVAILABLE DRUSH COMMANDS --------------- 1. drush auctioneer:purge_orphan_bids Purge/remove bids which parent auction has been deleted. It is also possible to use: drush auctioneer-pob --limit=30 Previous command will process an amount of 30 bids max. 2. drush auctioneer:place_auction_statistics AUCTION_ID Initialize or update statistics for an existing auction. Also, you can to: drush auctioneer-pas AUCTION_ID 3. drush auctioneer:display_auction_statistics AUCTION_ID Display statistics for a specified auction. Currently, it's possible to display text plain data or JSON format, by using: drush auctioneer-das AUCTION_ID --format=json 4. drush auctioneer:check_auction_dates Check/close auctions where its date range has ended. It is also possible to: drush auctioneer-cad --limit=30 Previous command will process an amount of 30 auctions max. auctioneer.api.php 0 → 100644 +24 −0 Changes for auctioneer.api.php: 24 added lines, 0 removed lines. Original line number Diff line number Diff line <?php /** * @file * Hooks provided by the auctioneer module. */ use Drupal\auctioneer\Entity\AuctionInterface; /** * @addtogroup hooks * @{ */ /** * Alter auction contexts. */ function hook_auctioneer_auction_context_alter(AuctionInterface $auction, array $plugin_definition, array &$context) { array_push($context, 'custom_context'); } /** * @} End of "addtogroup hooks". */ auctioneer.install +6 −0 Changes for auctioneer.install: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -126,6 +126,12 @@ function auctioneer_schema() { 'not null' => TRUE, 'default' => 0, ], 'context' => [ 'description' => 'Arbitrary comma-separated list of strings about nature of this auction.', 'type' => 'text', 'size' => 'normal', 'not null' => FALSE, ], ], 'primary key' => ['auction_id'], 'foreign keys' => [ Loading auctioneer.module +1 −0 Changes for auctioneer.module: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -178,6 +178,7 @@ function auctioneer_query_auctioneer_auction__random_bid_alter(AlterableInterfac */ function auctioneer_cron() { \Drupal::service('auctioneer.auction_type.manager')->purgeOrphanBids(); \Drupal::service('auctioneer.auction_type.date_range.manager')->checkDateRangeAuctionTypeAuctions(); } /** Loading auctioneer.services.yml +4 −1 Changes for auctioneer.services.yml: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -7,4 +7,7 @@ services: arguments: ['@entity_type.manager'] auctioneer.auction_type.manager: class: Drupal\auctioneer\AuctionTypeManager arguments: ['@plugin.manager.auctioneer.auction_type', '@entity_type.manager', '@auctioneer.auction_field.manager', '@database', '@logger.factory', '@current_user'] arguments: ['@plugin.manager.auctioneer.auction_type', '@entity_type.manager', '@auctioneer.auction_field.manager', '@database', '@logger.factory', '@current_user', '@module_handler'] auctioneer.auction_type.date_range.manager: class: Drupal\auctioneer\DateRangeAuctionTypeManager arguments: ['@auctioneer.auction_type.manager'] Loading
README.txt +28 −0 Changes for README.txt: 28 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,9 +2,37 @@ BASIC USAGE --------------- 1. Enable this module, as usual. 2. Go to /admin/structure/auctioneer. All settings are grouped here. 3. Go to /admin/structure/auctioneer/settings/bid_type and add a new Bid type. 4. Go to /admin/structure/auctioneer/settings/auction_type and add a new Auction type. Pick the bid type you created at previous step. 5. Now, go to /admin/structure/auctioneer/auctions and add a new auction of the type you've just created. AVAILABLE DRUSH COMMANDS --------------- 1. drush auctioneer:purge_orphan_bids Purge/remove bids which parent auction has been deleted. It is also possible to use: drush auctioneer-pob --limit=30 Previous command will process an amount of 30 bids max. 2. drush auctioneer:place_auction_statistics AUCTION_ID Initialize or update statistics for an existing auction. Also, you can to: drush auctioneer-pas AUCTION_ID 3. drush auctioneer:display_auction_statistics AUCTION_ID Display statistics for a specified auction. Currently, it's possible to display text plain data or JSON format, by using: drush auctioneer-das AUCTION_ID --format=json 4. drush auctioneer:check_auction_dates Check/close auctions where its date range has ended. It is also possible to: drush auctioneer-cad --limit=30 Previous command will process an amount of 30 auctions max.
auctioneer.api.php 0 → 100644 +24 −0 Changes for auctioneer.api.php: 24 added lines, 0 removed lines. Original line number Diff line number Diff line <?php /** * @file * Hooks provided by the auctioneer module. */ use Drupal\auctioneer\Entity\AuctionInterface; /** * @addtogroup hooks * @{ */ /** * Alter auction contexts. */ function hook_auctioneer_auction_context_alter(AuctionInterface $auction, array $plugin_definition, array &$context) { array_push($context, 'custom_context'); } /** * @} End of "addtogroup hooks". */
auctioneer.install +6 −0 Changes for auctioneer.install: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -126,6 +126,12 @@ function auctioneer_schema() { 'not null' => TRUE, 'default' => 0, ], 'context' => [ 'description' => 'Arbitrary comma-separated list of strings about nature of this auction.', 'type' => 'text', 'size' => 'normal', 'not null' => FALSE, ], ], 'primary key' => ['auction_id'], 'foreign keys' => [ Loading
auctioneer.module +1 −0 Changes for auctioneer.module: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -178,6 +178,7 @@ function auctioneer_query_auctioneer_auction__random_bid_alter(AlterableInterfac */ function auctioneer_cron() { \Drupal::service('auctioneer.auction_type.manager')->purgeOrphanBids(); \Drupal::service('auctioneer.auction_type.date_range.manager')->checkDateRangeAuctionTypeAuctions(); } /** Loading
auctioneer.services.yml +4 −1 Changes for auctioneer.services.yml: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -7,4 +7,7 @@ services: arguments: ['@entity_type.manager'] auctioneer.auction_type.manager: class: Drupal\auctioneer\AuctionTypeManager arguments: ['@plugin.manager.auctioneer.auction_type', '@entity_type.manager', '@auctioneer.auction_field.manager', '@database', '@logger.factory', '@current_user'] arguments: ['@plugin.manager.auctioneer.auction_type', '@entity_type.manager', '@auctioneer.auction_field.manager', '@database', '@logger.factory', '@current_user', '@module_handler'] auctioneer.auction_type.date_range.manager: class: Drupal\auctioneer\DateRangeAuctionTypeManager arguments: ['@auctioneer.auction_type.manager']