How is Magento\Customer\Block\Account\SortLinkInterface declared, implemented, and used?

Declaration

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Customer/Block/Account/SortLinkInterface.php#L7-L27

Presense

The Magento\Customer\Block\Account\SortLinkInterface has been added on 2016-10-17 to Magento 2.2, it is absent in Magento 2.0 and 2.1.

https://github.com/magento/magento2/commit/95d3148fe

Implementations

1. Magento\Customer\Block\Account\SortLink (the default implementation)

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Customer/Block/Account/SortLink.php#L9-L12

This implementation is default:
https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Customer/etc/di.xml#L60-L61

2. Magento\Customer\Block\Account\AuthorizationLink

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Customer/Block/Account/AuthorizationLink.php#L11-L17

3. Magento\Customer\Block\Account\Delimiter

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Customer/Block/Account/Delimiter.php#L7-L14

4. Magento\Customer\Block\Account\Link

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Customer/Block/Account/Link.php#L10-L16

5. Magento\Wishlist\Block\Link

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Wishlist/Block/Link.php#L14-L20

The primary usage: Magento\Customer\Block\Account\Navigation

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Customer/Block/Account/Navigation.php#L7-L49

The usages in layouts (the customer account tabs)

1. «Account Dashboard» (customer-account-navigation-account-link)

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Customer/view/frontend/layout/customer_account.xml#L20-L26

The Luma case

https://github.com/magento/magento2/blob/6086595c/app/design/frontend/Magento/luma/Magento_Customer/layout/customer_account.xml#L20-L26

2. «My Orders» (customer-account-navigation-orders-link)

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Sales/view/frontend/layout/customer_account.xml#L11-L17

3. «My Downloadable Products» (customer-account-navigation-downloadable-products-link)

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Downloadable/view/frontend/layout/customer_account.xml#L11-L17

4. «My Wish List» (customer-account-navigation-wish-list-link)

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Wishlist/view/frontend/layout/customer_account.xml#L11-L17

5. «Address Book» (customer-account-navigation-address-link)

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Customer/view/frontend/layout/customer_account.xml#L32-L38

The Luma case

https://github.com/magento/magento2/blob/6086595c/app/design/frontend/Magento/luma/Magento_Customer/layout/customer_account.xml#L33-L39

6. «Account Information» (customer-account-navigation-account-edit-link)

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Customer/view/frontend/layout/customer_account.xml#L39-L45

The Luma case

https://github.com/magento/magento2/blob/6086595c/app/design/frontend/Magento/luma/Magento_Customer/layout/customer_account.xml#L40LL46

7. «Stored Payment Methods» (customer-account-navigation-my-credit-cards-link)

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Vault/view/frontend/layout/customer_account.xml#L11-L17

8. «Billing Agreements» (customer-account-navigation-billing-agreements-link)

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Paypal/view/frontend/layout/customer_account.xml#L14-L20

9. «My Product Reviews» (customer-account-navigation-product-reviews-link)

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Review/view/frontend/layout/customer_account.xml#L11-L17

10. «Newsletter Subscriptions» (customer-account-navigation-newsletter-subscriptions-link)

https://github.com/magento/magento2/blob/6086595c/app/code/Magento/Newsletter/view/frontend/layout/customer_account.xml#L11-L17

See also: